@gvnrdao/dh-lit-actions 0.0.311 → 0.0.312

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 1608,
5
5
  "compressionRatio": 0.45895020188425306,
6
6
  "hash": "c6042989c2e0ac53631e008a960aef78f977471b9a7a8fc05a1537b10f34c8a9",
7
- "buildTime": 1781783779119,
7
+ "buildTime": 1783336873419,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 856,
5
5
  "compressionRatio": 0.4827794561933535,
6
6
  "hash": "bc0bcb38452275c93fa74c5240ae496d7a3eef9d38e7fb0dd99c5202c554d5e3",
7
- "buildTime": 1781783779128,
7
+ "buildTime": 1783336873428,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 4307,
5
5
  "compressionRatio": 0.5257130271996476,
6
6
  "hash": "22aa318284a25e721d1c949c8b4e5dbbb21853d1a3f649a72fd85ae32467bb17",
7
- "buildTime": 1781783779384,
7
+ "buildTime": 1783336873457,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 1889,
5
5
  "compressionRatio": 0.4549913444893249,
6
6
  "hash": "790a1c5326a623065ab3c295d2c50cc8838d643730e53cb993a303ab9d7e0d83",
7
- "buildTime": 1781783779448,
7
+ "buildTime": 1783336873466,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 2220,
5
5
  "compressionRatio": 0.4740582800284293,
6
6
  "hash": "828aea87c7a7652377e00cb7a97c18324f09b87d3fa6703487fa3034e204a82c",
7
- "buildTime": 1781783779494,
7
+ "buildTime": 1783336873476,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 1046,
5
5
  "compressionRatio": 0.47960199004975124,
6
6
  "hash": "03ee5be239c91c735d2c95db89a0d1b77e602cfc18af8eb64b3281fddcd90a72",
7
- "buildTime": 1781783779536,
7
+ "buildTime": 1783336873485,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 2329,
5
5
  "compressionRatio": 0.44875739644970414,
6
6
  "hash": "6d26460ed9170782834926bcc30669fb48a9a0346f555eb838c99f8d9e6e8796",
7
- "buildTime": 1781783779551,
7
+ "buildTime": 1783336873494,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 25519,
5
5
  "compressionRatio": 0.5072981426420049,
6
6
  "hash": "000e2f8bdbccdc95b0db0fb3f12412e2e76eea16a8456d37914d324437ae291c",
7
- "buildTime": 1781783779639,
7
+ "buildTime": 1783336873596,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 42376,
5
5
  "compressionRatio": 0.5648789904403988,
6
6
  "hash": "f4aed3d88f6fbff6623ed2047436cecd4f561a74883171ea6f4ebe0a1129973c",
7
- "buildTime": 1781783779792,
7
+ "buildTime": 1783336873733,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 45400,
5
5
  "compressionRatio": 0.5661563748256024,
6
6
  "hash": "4c75ae20614bad806cc045411344bf298568ad9c08e89db5c98b1d8a6360e410",
7
- "buildTime": 1781783779943,
7
+ "buildTime": 1783336873859,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 79782,
5
5
  "compressionRatio": 0.5625219336725742,
6
6
  "hash": "e824eb473df8eba3a025ac3adc46730dbf89f90884d7c05a78cc07b90d6bc4df",
7
- "buildTime": 1781783780136,
7
+ "buildTime": 1783336874348,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 832,
5
5
  "compressionRatio": 0.5026897788404064,
6
6
  "hash": "700f8992a20357ac718df78f82a75641e892d24bcb925357087cf062cf521ae0",
7
- "buildTime": 1781783780139,
7
+ "buildTime": 1783336874353,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 66543,
5
5
  "compressionRatio": 0.5853424478274145,
6
6
  "hash": "0db666fa2888e9acea13d8e4d79edd4ca252f5a4bb06d97e53aa14a9a34b7143",
7
- "buildTime": 1781783780485,
7
+ "buildTime": 1783336874515,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 58444,
5
5
  "compressionRatio": 0.5523453537179448,
6
6
  "hash": "0f42e9f8984433fef95875d35eb3c8d985e7ce15ad309e6aa1093d6fd1ba0bb5",
7
- "buildTime": 1781783780650,
7
+ "buildTime": 1783336874659,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 48397,
5
5
  "compressionRatio": 0.5623864078196631,
6
6
  "hash": "da3750a70e532b87f3590a3e2d8c2d51e700589f6e111bb291384ab01304af35",
7
- "buildTime": 1781783780776,
7
+ "buildTime": 1783336874812,
8
8
  "version": "0.1.0"
9
9
  }
@@ -1 +1 @@
1
- var _LIT_ACTION_=(()=>{var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,i={};async function main(e){const t=e.pkpId,r=e.targetPkpTokenId,o=e.expectedCid,n=e.network,i=e.ipfsId,s=e.borrowerAddress,a=e.pkpValidationContract;if(!t)throw new Error("pkpId is required (Chipotle wallet ID for user PKP)");if(!o)throw new Error("expectedCid is required");if(!i)throw new Error("ipfsId is required to derive the validator signing key");if(!s)throw new Error("borrowerAddress is required for EIP-712 attestation");if(!a)throw new Error("pkpValidationContract is required for EIP-712 domain");let l=e.chainId;if(null==l&&"chipotle"===n&&(l=11155111),null==l)throw new Error("chainId is required for EIP-712 domain");console.log("[PKP Validator] Step 1: Getting user PKP key...");const c=await Lit.Actions.getPrivateKey({pkpId:t}),d="string"==typeof c?c.startsWith("0x")?c:`0x${c}`:String(c);console.log("[PKP Validator] Step 2: Deriving public key...");const f=ethers.utils.computePublicKey(d,!1);function u(e,t){const r=e.startsWith("0x")?e.slice(2):e;if(130!==r.length)throw new Error(`Invalid public key length: ${r.length}`);const o=r.slice(2,66),n=r.slice(66,130),i=(BigInt("0x"+n)%2n===0n?"02":"03")+o,s=ethers.utils.sha256("0x"+i);let a;return a="mainnet"===t?"bc":"testnet"===t?"tb":"bcrt",function(e,t,r){const o="qpzry9x8gf2tvdw0s3jn54khce6mua7l",n=[];for(let e=0;e<r.length;e+=2)n.push(parseInt(r.substr(e,2),16));const i=[t].concat(function(e,t,r,o){let n=0,i=0;const s=[],a=(1<<r)-1;for(const o of e){if(o<0||o>>t)throw new Error("Invalid data for bit conversion");for(n=n<<t|o,i+=t;i>=r;)i-=r,s.push(n>>i&a)}if(o)i>0&&s.push(n<<r-i&a);else if(i>=t||n<<r-i&a)throw new Error("Invalid padding in bit conversion");return s}(n,8,5,!0)),s=function(e,t){const r=function(e){const t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r)>>5);t.push(0);for(let r=0;r<e.length;r++)t.push(31&e.charCodeAt(r));return t}(e).concat(t).concat([0,0,0,0,0,0]),o=1^function(e){const t=[996825010,642813549,513874426,1027748829,705979059];let r=1;for(const o of e){const e=r>>25;r=(33554431&r)<<5^o;for(let o=0;o<5;o++)e>>o&1&&(r^=t[o])}return r}(r),n=[];for(let e=0;e<6;e++)n.push(o>>5*(5-e)&31);return n}(e,i),a=i.concat(s);let l=e+"1";for(const e of a)l+=o[e];return l}(a,0,ethers.utils.ripemd160(s).slice(2))}console.log("[PKP Validator] Step 3: Deriving Bitcoin addresses...");const p=u(f,"mainnet"),h=u(f,"regtest");if(console.log(`[PKP Validator] Mainnet: ${p}`),console.log(`[PKP Validator] Regtest: ${h}`),console.log("[PKP Validator] Step 4: Signing attestation..."),!r)throw new Error("targetPkpTokenId is required for PKP validator attestation (the on-chain verifier reconstructs from the NFT token id; the keccak fallback produces an unverifiable signature)");const g=`PKP::${ethers.BigNumber.from(r).toString()}::CID::${o.toLowerCase()}::MAINNET::${p}::REGTEST::${h}::SECURE`,P=ethers.utils.toUtf8Bytes(g),w=ethers.utils.hashMessage(P);console.log(`[PKP Validator] Message: ${g}`),console.log(`[PKP Validator] Message hash: ${w}`);const I=e.validatorWalletAddress||globalThis.validatorWalletAddress;if(!I||!I.startsWith("0x"))throw new Error("validatorWalletAddress required \u2014 must be a createWallet-derived address");const b=await Lit.Actions.getPrivateKey({pkpId:I}),v="string"==typeof b?b.startsWith("0x")?b:`0x${b}`:String(b),k=new ethers.Wallet(v),m=await k.signMessage(P);return console.log("[PKP Validator] \u2705 Complete"),{success:!0,pkpPublicKey:f,bitcoinAddresses:{mainnet:p,regtest:h},validatorPkp:k.address,signature:m,timestamp:Date.now(),network:n,expectedCid:o}}return((e,r)=>{for(var o in r)t(e,o,{get:r[o],enumerable:!0})})(i,{main:()=>main}),e=i,((e,i,s,a)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let l of o(i))n.call(e,l)||l===s||t(e,l,{get:()=>i[l],enumerable:!(a=r(i,l))||a.enumerable});return e})(t({},"__esModule",{value:!0}),e)})();if("object"==typeof _LIT_ACTION_)if("function"==typeof _LIT_ACTION_.main)var main=_LIT_ACTION_.main;else"function"==typeof _LIT_ACTION_.go&&_LIT_ACTION_.go();
1
+ var _LIT_ACTION_=(()=>{var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,i={};async function main(e){const t=e.pkpId,r=e.targetPkpTokenId,o=e.expectedCid,n=e.network,i=e.ipfsId,s=e.borrowerAddress,a=e.pkpValidationContract;if(!t)throw new Error("pkpId is required (Chipotle wallet ID for user PKP)");if(!o)throw new Error("expectedCid is required");if(!i)throw new Error("ipfsId is required to derive the validator signing key");if(!s)throw new Error("borrowerAddress is required for EIP-712 attestation");if(!a)throw new Error("pkpValidationContract is required for EIP-712 domain");let l=e.chainId;if(null==l&&"chipotle"===n&&(l=11155111),null==l)throw new Error("chainId is required for EIP-712 domain");console.log("[PKP Validator] Step 1: Getting user PKP key...");const c=await Lit.Actions.getPrivateKey({pkpId:t}),d="string"==typeof c?c.startsWith("0x")?c:`0x${c}`:String(c);console.log("[PKP Validator] Step 2: Deriving public key...");const f=ethers.utils.computePublicKey(d,!1);function u(e,t){const r=e.startsWith("0x")?e.slice(2):e;if(130!==r.length)throw new Error(`Invalid public key length: ${r.length}`);const o=r.slice(2,66),n=r.slice(66,130),i=(BigInt("0x"+n)%2n===0n?"02":"03")+o,s=ethers.utils.sha256("0x"+i);let a;return a="mainnet"===t?"bc":"testnet"===t?"tb":"bcrt",function(e,t,r){const o="qpzry9x8gf2tvdw0s3jn54khce6mua7l",n=[];for(let e=0;e<r.length;e+=2)n.push(parseInt(r.substr(e,2),16));const i=[t].concat(function(e,t,r,o){let n=0,i=0;const s=[],a=(1<<r)-1;for(const o of e){if(o<0||o>>t)throw new Error("Invalid data for bit conversion");for(n=n<<t|o,i+=t;i>=r;)i-=r,s.push(n>>i&a)}if(o)i>0&&s.push(n<<r-i&a);else if(i>=t||n<<r-i&a)throw new Error("Invalid padding in bit conversion");return s}(n,8,5,!0)),s=function(e,t){const r=function(e){const t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r)>>5);t.push(0);for(let r=0;r<e.length;r++)t.push(31&e.charCodeAt(r));return t}(e).concat(t).concat([0,0,0,0,0,0]),o=1^function(e){const t=[996825010,642813549,513874426,1027748829,705979059];let r=1;for(const o of e){const e=r>>25;r=(33554431&r)<<5^o;for(let o=0;o<5;o++)e>>o&1&&(r^=t[o])}return r}(r),n=[];for(let e=0;e<6;e++)n.push(o>>5*(5-e)&31);return n}(e,i),a=i.concat(s);let l=e+"1";for(const e of a)l+=o[e];return l}(a,0,ethers.utils.ripemd160(s).slice(2))}console.log("[PKP Validator] Step 3: Deriving Bitcoin addresses...");const p=u(f,"mainnet"),h=u(f,"regtest");if(console.log(`[PKP Validator] Mainnet: ${p}`),console.log(`[PKP Validator] Regtest: ${h}`),console.log("[PKP Validator] Step 4: Signing attestation..."),!r)throw new Error("targetPkpTokenId is required for PKP validator attestation (the on-chain verifier reconstructs from the NFT token id; the keccak fallback produces an unverifiable signature)");const g=`PKP::${ethers.BigNumber.from(r).toString()}::CID::${o.toLowerCase()}::MAINNET::${p}::REGTEST::${h}::BORROWER::${s.toLowerCase()}::SECURE`,P=ethers.utils.toUtf8Bytes(g),w=ethers.utils.hashMessage(P);console.log(`[PKP Validator] Message: ${g}`),console.log(`[PKP Validator] Message hash: ${w}`);const I=e.validatorWalletAddress||globalThis.validatorWalletAddress;if(!I||!I.startsWith("0x"))throw new Error("validatorWalletAddress required \u2014 must be a createWallet-derived address");const b=await Lit.Actions.getPrivateKey({pkpId:I}),v="string"==typeof b?b.startsWith("0x")?b:`0x${b}`:String(b),k=new ethers.Wallet(v),m=await k.signMessage(P);return console.log("[PKP Validator] \u2705 Complete"),{success:!0,pkpPublicKey:f,bitcoinAddresses:{mainnet:p,regtest:h},validatorPkp:k.address,signature:m,timestamp:Date.now(),network:n,expectedCid:o}}return((e,r)=>{for(var o in r)t(e,o,{get:r[o],enumerable:!0})})(i,{main:()=>main}),e=i,((e,i,s,a)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let l of o(i))n.call(e,l)||l===s||t(e,l,{get:()=>i[l],enumerable:!(a=r(i,l))||a.enumerable});return e})(t({},"__esModule",{value:!0}),e)})();if("object"==typeof _LIT_ACTION_)if("function"==typeof _LIT_ACTION_.main)var main=_LIT_ACTION_.main;else"function"==typeof _LIT_ACTION_.go&&_LIT_ACTION_.go();
@@ -1 +1 @@
1
- c3b121afcdc0d7d7ed7ca3be5b185fc502ffad99bf83cdf166769bbfa5194687
1
+ 4c0d65bf1f33cdac22a78fd8c4764319cc3fe00650e0fe7fa8a6090d9a318a7b
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "actionName": "pkp-validator",
3
- "originalSize": 8372,
4
- "minifiedSize": 4110,
5
- "compressionRatio": 0.5090778786430961,
6
- "hash": "c3b121afcdc0d7d7ed7ca3be5b185fc502ffad99bf83cdf166769bbfa5194687",
7
- "buildTime": 1781783780810,
3
+ "originalSize": 8457,
4
+ "minifiedSize": 4140,
5
+ "compressionRatio": 0.5104647037956722,
6
+ "hash": "4c0d65bf1f33cdac22a78fd8c4764319cc3fe00650e0fe7fa8a6090d9a318a7b",
7
+ "buildTime": 1783336874829,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 8695,
5
5
  "compressionRatio": 0.5565811617114591,
6
6
  "hash": "ba20ade60a7fa5acd80dadfafa179c507388cfe6ce48a22a672d70b317ffcc74",
7
- "buildTime": 1781783780834,
7
+ "buildTime": 1783336874858,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 68239,
5
5
  "compressionRatio": 0.57494876761989,
6
6
  "hash": "ada27fea57aa3f3b861c49e75ed1f80b72500fdccc1d6e88ee1a3c1396b81867",
7
- "buildTime": 1781783780979,
7
+ "buildTime": 1783336875028,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 34413,
5
5
  "compressionRatio": 0.4994108662448178,
6
6
  "hash": "26b11730cf5d9eb4af0b1fe65192d26ccee50369c0472211a0ea11e26ef51cc5",
7
- "buildTime": 1781783781123,
7
+ "buildTime": 1783336875105,
8
8
  "version": "0.1.0"
9
9
  }
@@ -4,6 +4,6 @@
4
4
  "minifiedSize": 72074,
5
5
  "compressionRatio": 0.5735619534476434,
6
6
  "hash": "567a51d3beaedbda4f0af2636835ca8a2af89c2264e91f8dc31f522c1a424b7b",
7
- "buildTime": 1781783781274,
7
+ "buildTime": 1783336875246,
8
8
  "version": "0.1.0"
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gvnrdao/dh-lit-actions",
3
- "version": "0.0.311",
3
+ "version": "0.0.312",
4
4
  "type": "commonjs",
5
5
  "description": "Diamond Hands Protocol LIT Actions - Deterministic, Auditable Builds",
6
6
  "main": "pkg-dist/pkg-src/index.js",
@@ -657,17 +657,17 @@ var DH_LIT_ACTIONS_CHIPOTLE = {
657
657
  hash: "d6eb8665fa4f1fe19b6a2bc81fbf729af68a1daf30117f40e37705381978a7ce"
658
658
  },
659
659
  pkpValidator: {
660
- cid: "QmRAueBjNG78qA79x4NL4ogfNg7e6j6DiEGenEN4S3BSGg",
660
+ cid: "QmRfPvd7R7MoEnShds28Y4ovdV8RoDCGkYWTcF1JHZVTQa",
661
661
  authorizedCidHex: cidToHex(
662
- "QmRAueBjNG78qA79x4NL4ogfNg7e6j6DiEGenEN4S3BSGg"
662
+ "QmRfPvd7R7MoEnShds28Y4ovdV8RoDCGkYWTcF1JHZVTQa"
663
663
  ),
664
664
  name: "Pkp Validator",
665
665
  description: "Production Pkp Validator",
666
666
  version: "1.0.0",
667
667
  deployed: true,
668
- deployedAt: 1781116572961,
669
- size: 4110,
670
- hash: "c3b121afcdc0d7d7ed7ca3be5b185fc502ffad99bf83cdf166769bbfa5194687",
668
+ deployedAt: 1783106284785,
669
+ size: 4140,
670
+ hash: "4c0d65bf1f33cdac22a78fd8c4764319cc3fe00650e0fe7fa8a6090d9a318a7b",
671
671
  validatorWalletAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236",
672
672
  pkp: {
673
673
  publicKey: "0x04ec0e3acc40884e3f366ca469d08899eb640ad5259fa196b0238075086208a9f8732a3175704f35f0bcc28e07406cfb24c254efd1e7355640577330f0d2dd755f",