@boostxyz/sdk 0.0.0-alpha.8 → 0.0.0-alpha.9

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.
Files changed (180) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +1 -1
  3. package/dist/Actions/ContractAction.d.ts +46 -3
  4. package/dist/Actions/ContractAction.d.ts.map +1 -1
  5. package/dist/Actions/ERC721MintAction.d.ts +37 -10
  6. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  7. package/dist/Actions/EventAction.cjs +1 -1
  8. package/dist/Actions/EventAction.cjs.map +1 -1
  9. package/dist/Actions/EventAction.d.ts +257 -12
  10. package/dist/Actions/EventAction.d.ts.map +1 -1
  11. package/dist/Actions/EventAction.js +249 -82
  12. package/dist/Actions/EventAction.js.map +1 -1
  13. package/dist/AllowLists/AllowList.cjs +1 -1
  14. package/dist/AllowLists/AllowList.js +1 -1
  15. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  16. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  17. package/dist/AllowLists/SimpleAllowList.d.ts +31 -2
  18. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  19. package/dist/AllowLists/SimpleAllowList.js +52 -37
  20. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  21. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  22. package/dist/AllowLists/SimpleDenyList.cjs.map +1 -1
  23. package/dist/AllowLists/SimpleDenyList.d.ts +31 -2
  24. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  25. package/dist/AllowLists/SimpleDenyList.js +41 -129
  26. package/dist/AllowLists/SimpleDenyList.js.map +1 -1
  27. package/dist/Auth/PassthroughAuth.cjs +1 -1
  28. package/dist/Auth/PassthroughAuth.cjs.map +1 -1
  29. package/dist/Auth/PassthroughAuth.js +4 -4
  30. package/dist/Auth/PassthroughAuth.js.map +1 -1
  31. package/dist/Boost.cjs +1 -1
  32. package/dist/Boost.cjs.map +1 -1
  33. package/dist/Boost.d.ts +93 -1
  34. package/dist/Boost.d.ts.map +1 -1
  35. package/dist/Boost.js +151 -5
  36. package/dist/Boost.js.map +1 -1
  37. package/dist/BoostCore.cjs +2 -2
  38. package/dist/BoostCore.cjs.map +1 -1
  39. package/dist/BoostCore.d.ts +12 -6
  40. package/dist/BoostCore.d.ts.map +1 -1
  41. package/dist/BoostCore.js +168 -166
  42. package/dist/BoostCore.js.map +1 -1
  43. package/dist/BoostRegistry.cjs +1 -1
  44. package/dist/BoostRegistry.cjs.map +1 -1
  45. package/dist/BoostRegistry.d.ts +4 -4
  46. package/dist/BoostRegistry.d.ts.map +1 -1
  47. package/dist/BoostRegistry.js +19 -24
  48. package/dist/BoostRegistry.js.map +1 -1
  49. package/dist/Budgets/Budget.cjs +1 -1
  50. package/dist/Budgets/Budget.js +1 -1
  51. package/dist/Budgets/ManagedBudget.cjs +1 -1
  52. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  53. package/dist/Budgets/ManagedBudget.d.ts +40 -2
  54. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  55. package/dist/Budgets/ManagedBudget.js +53 -36
  56. package/dist/Budgets/ManagedBudget.js.map +1 -1
  57. package/dist/Budgets/SimpleBudget.d.ts +33 -2
  58. package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
  59. package/dist/Budgets/VestingBudget.d.ts +54 -2
  60. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  61. package/dist/Deployable/Contract.cjs +1 -1
  62. package/dist/Deployable/Contract.cjs.map +1 -1
  63. package/dist/Deployable/Contract.js +1 -1
  64. package/dist/Deployable/Contract.js.map +1 -1
  65. package/dist/Deployable/DeployableTarget.cjs +1 -1
  66. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  67. package/dist/Deployable/DeployableTarget.js +3 -3
  68. package/dist/Deployable/DeployableTarget.js.map +1 -1
  69. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  70. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  71. package/dist/Incentives/AllowListIncentive.d.ts +35 -5
  72. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  73. package/dist/Incentives/AllowListIncentive.js +33 -21
  74. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  75. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  76. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  77. package/dist/Incentives/CGDAIncentive.d.ts +89 -5
  78. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  79. package/dist/Incentives/CGDAIncentive.js +44 -23
  80. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  81. package/dist/Incentives/ERC1155Incentive.d.ts +67 -6
  82. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  83. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  84. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  85. package/dist/Incentives/ERC20Incentive.d.ts +49 -5
  86. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  87. package/dist/Incentives/ERC20Incentive.js +46 -27
  88. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  89. package/dist/Incentives/ERC20VariableIncentive.d.ts +42 -5
  90. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  91. package/dist/Incentives/Incentive.cjs +1 -1
  92. package/dist/Incentives/Incentive.cjs.map +1 -1
  93. package/dist/Incentives/Incentive.js +48 -32
  94. package/dist/Incentives/Incentive.js.map +1 -1
  95. package/dist/Incentives/PointsIncentive.cjs +1 -1
  96. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  97. package/dist/Incentives/PointsIncentive.d.ts +49 -5
  98. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  99. package/dist/Incentives/PointsIncentive.js +38 -21
  100. package/dist/Incentives/PointsIncentive.js.map +1 -1
  101. package/dist/Validators/SignerValidator.cjs +1 -1
  102. package/dist/Validators/SignerValidator.cjs.map +1 -1
  103. package/dist/Validators/SignerValidator.d.ts +298 -5
  104. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  105. package/dist/Validators/SignerValidator.js +151 -26
  106. package/dist/Validators/SignerValidator.js.map +1 -1
  107. package/dist/Validators/Validator.cjs +1 -1
  108. package/dist/Validators/Validator.js +1 -1
  109. package/dist/claiming.cjs +2 -0
  110. package/dist/claiming.cjs.map +1 -0
  111. package/dist/claiming.d.ts +43 -0
  112. package/dist/claiming.d.ts.map +1 -0
  113. package/dist/claiming.js +17 -0
  114. package/dist/claiming.js.map +1 -0
  115. package/dist/errors.cjs.map +1 -1
  116. package/dist/errors.d.ts +1 -1
  117. package/dist/errors.d.ts.map +1 -1
  118. package/dist/errors.js.map +1 -1
  119. package/dist/{generated-Cbv8zFkf.js → generated-57_Kffpz.js} +8 -5
  120. package/dist/generated-57_Kffpz.js.map +1 -0
  121. package/dist/{generated-BzszviNp.cjs → generated-wKBNvm48.cjs} +2 -2
  122. package/dist/generated-wKBNvm48.cjs.map +1 -0
  123. package/dist/index.cjs +1 -1
  124. package/dist/index.d.ts +4 -4
  125. package/dist/index.d.ts.map +1 -1
  126. package/dist/index.js +108 -125
  127. package/dist/transfers.cjs +2 -0
  128. package/dist/transfers.cjs.map +1 -0
  129. package/dist/transfers.d.ts +198 -0
  130. package/dist/transfers.d.ts.map +1 -0
  131. package/dist/transfers.js +84 -0
  132. package/dist/transfers.js.map +1 -0
  133. package/dist/utils.cjs +1 -1
  134. package/dist/utils.cjs.map +1 -1
  135. package/dist/utils.d.ts +2 -1371
  136. package/dist/utils.d.ts.map +1 -1
  137. package/dist/utils.js +26 -653
  138. package/dist/utils.js.map +1 -1
  139. package/package.json +17 -3
  140. package/src/Actions/Action.test.ts +5 -4
  141. package/src/Actions/ContractAction.test.ts +4 -6
  142. package/src/Actions/ContractAction.ts +73 -10
  143. package/src/Actions/ERC721MintAction.test.ts +2 -2
  144. package/src/Actions/ERC721MintAction.ts +70 -16
  145. package/src/Actions/EventAction.test.ts +43 -17
  146. package/src/Actions/EventAction.ts +452 -35
  147. package/src/AllowLists/SimpleAllowList.ts +48 -5
  148. package/src/AllowLists/SimpleDenyList.ts +47 -109
  149. package/src/Auth/PassthroughAuth.ts +1 -1
  150. package/src/Boost.ts +136 -1
  151. package/src/BoostCore.test.ts +4 -11
  152. package/src/BoostCore.ts +39 -33
  153. package/src/BoostRegistry.ts +19 -22
  154. package/src/Budgets/ManagedBudget.ts +69 -16
  155. package/src/Budgets/SimpleBudget.ts +57 -14
  156. package/src/Budgets/VestingBudget.ts +79 -9
  157. package/src/Deployable/Contract.ts +1 -1
  158. package/src/Deployable/DeployableTarget.ts +2 -2
  159. package/src/Incentives/AllowListIncentive.test.ts +2 -5
  160. package/src/Incentives/AllowListIncentive.ts +59 -15
  161. package/src/Incentives/CGDAIncentive.test.ts +3 -7
  162. package/src/Incentives/CGDAIncentive.ts +123 -19
  163. package/src/Incentives/ERC1155Incentive.test.ts +2 -13
  164. package/src/Incentives/ERC1155Incentive.ts +104 -22
  165. package/src/Incentives/ERC20Incentive.test.ts +6 -17
  166. package/src/Incentives/ERC20Incentive.ts +86 -21
  167. package/src/Incentives/ERC20VariableIncentive.test.ts +4 -24
  168. package/src/Incentives/ERC20VariableIncentive.ts +71 -19
  169. package/src/Incentives/Incentive.test.ts +1 -1
  170. package/src/Incentives/PointsIncentive.test.ts +3 -6
  171. package/src/Incentives/PointsIncentive.ts +79 -17
  172. package/src/Validators/SignerValidator.test.ts +3 -7
  173. package/src/Validators/SignerValidator.ts +422 -13
  174. package/src/claiming.ts +56 -0
  175. package/src/errors.ts +1 -1
  176. package/src/index.ts +10 -7
  177. package/src/transfers.ts +284 -0
  178. package/src/utils.ts +3 -2052
  179. package/dist/generated-BzszviNp.cjs.map +0 -1
  180. package/dist/generated-Cbv8zFkf.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SignerValidator.cjs","sources":["../../src/Validators/SignerValidator.ts"],"sourcesContent":["import {\n readSignerValidatorHashSignerData,\n readSignerValidatorSigners,\n signerValidatorAbi,\n simulateSignerValidatorSetAuthorized,\n simulateSignerValidatorSetValidatorCaller,\n simulateSignerValidatorValidate,\n writeSignerValidatorSetAuthorized,\n writeSignerValidatorSetValidatorCaller,\n writeSignerValidatorValidate,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/validators/SignerValidator.sol/SignerValidator.json';\nimport type { Address, ContractEventName, Hex } from 'viem';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type SignerValidatorPayload,\n type SignerValidatorSignaturePayload,\n type SignerValidatorValidatePayload,\n type WriteParams,\n prepareSignerValidatorPayload,\n} from '../utils';\n\nexport { signerValidatorAbi };\nexport type { SignerValidatorPayload };\n\n/**\n * A generic `viem.Log` event with support for `BoostCore` event types.\n *\n * @export\n * @typedef {SignerValidatorLog}\n * @template {ContractEventName<\n * typeof signerValidatorAbi\n * >} [event=ContractEventName<typeof signerValidatorAbi>]\n */\nexport type SignerValidatorLog<\n event extends ContractEventName<\n typeof signerValidatorAbi\n > = ContractEventName<typeof signerValidatorAbi>,\n> = GenericLog<typeof signerValidatorAbi, event>;\n\n/**\n * A simple implementation of a Validator that verifies a given signature and checks the recovered address against a set of authorized signers\n *\n * @export\n * @class SignerValidator\n * @typedef {SignerValidator}\n * @extends {DeployableTarget<SignerValidatorPayload>}\n */\nexport class SignerValidator extends DeployableTarget<\n SignerValidatorPayload,\n typeof signerValidatorAbi\n> {\n public override readonly abi = signerValidatorAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_SIGNER_VALIDATOR_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.VALIDATOR;\n\n /**\n * The set of authorized signers\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof signerValidatorAbi, 'signers'>} [params]\n * @returns {unknown}\n */\n public async signers(\n address: Address,\n params?: ReadParams<typeof signerValidatorAbi, 'signers'>,\n ) {\n return readSignerValidatorSigners(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Retrieve the hash and signer data for a given hash\n *\n * @public\n * @async\n * @param {SignerValidatorSignaturePayload} payload\n * @param {?ReadParams<typeof signerValidatorAbi, 'hashSignerData'>} [params]\n * @returns {unknown}\n */\n public async hashSignerData(\n payload: SignerValidatorSignaturePayload,\n params?: ReadParams<typeof signerValidatorAbi, 'hashSignerData'>,\n ) {\n return readSignerValidatorHashSignerData(this._config, {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveQuantity,\n payload.claimant,\n payload.incentiveData,\n ],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n public async validate(\n payload: SignerValidatorValidatePayload,\n params?: WriteParams<typeof signerValidatorAbi, 'validate'>,\n ) {\n return this.awaitResult(this.validateRaw(payload, params));\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n public async validateRaw(\n payload: SignerValidatorValidatePayload,\n params?: ReadParams<typeof signerValidatorAbi, 'validate'>,\n ) {\n const { request, result } = await simulateSignerValidatorValidate(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveId,\n payload.claimant,\n payload.claimData,\n ],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorValidate(this._config, request);\n return { hash, result };\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]\n * @returns {unknown}\n */\n public async setAuthorized(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof signerValidatorAbi, 'setAuthorized'>,\n ) {\n return this.awaitResult(this.setAuthorizedRaw(addresses, allowed, params));\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]\n * @returns {unknown}\n */\n public async setAuthorizedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof signerValidatorAbi, 'setAuthorized'>,\n ) {\n const { request, result } = await simulateSignerValidatorSetAuthorized(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetAuthorized(this._config, request);\n return { hash, result };\n }\n\n public async setValidatorCallerRaw(\n address: Address,\n params?: WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>,\n ) {\n const { request, result } = await simulateSignerValidatorSetValidatorCaller(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [address],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetValidatorCaller(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n public async setValidatorCaller(\n address: Address,\n params?: WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>,\n ) {\n return this.awaitResult(this.setValidatorCallerRaw(address, params));\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SignerValidatorPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SignerValidatorPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: signerValidatorAbi,\n bytecode: bytecode as Hex,\n args: [prepareSignerValidatorPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["_SignerValidator","DeployableTarget","signerValidatorAbi","address","params","readSignerValidatorSigners","payload","readSignerValidatorHashSignerData","request","result","simulateSignerValidatorValidate","writeSignerValidatorValidate","addresses","allowed","simulateSignerValidatorSetAuthorized","writeSignerValidatorSetAuthorized","simulateSignerValidatorSetValidatorCaller","writeSignerValidatorSetValidatorCaller","_payload","_options","options","bytecode","prepareSignerValidatorPayload","RegistryType","SignerValidator"],"mappings":"03hBAuDaA,EAAN,MAAMA,UAAwBC,EAAAA,gBAGnC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA4B/B,MAAa,QACXC,EACAC,EACA,CACO,OAAAC,EAAA,GAA2B,KAAK,QAAS,CAC9C,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACF,CAAO,EAEd,GAAIC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,EAEhC,GAAIC,CACN,CAAA,EAMK,MAAA,CAAE,KAJI,MAAMa,EAAA,GACjB,KAAK,QACLT,CAAA,EAEa,OAAAC,EACjB,CAEA,MAAa,mBACXN,EACAC,EACA,CACA,OAAO,KAAK,YAAY,KAAK,sBAAsBD,EAASC,CAAM,CAAC,CACrE,CAUgB,gBACdc,EACAC,EACyB,CACzB,KAAM,CAACb,EAASc,CAAO,EAAI,KAAK,yBAC9BF,EACAC,CAAA,EAEK,MAAA,CACL,IAAKjB,EAAA,EACL,SAAAmB,EACA,KAAM,CAACC,gCAA8BhB,CAAO,CAAC,EAC7C,GAAG,KAAK,wBAAwBc,EAAQ,OAAO,CAAA,CAEnD,CACF,EA5MyBpB,EAAA,KAAgB,6CASvCA,EAAuB,aAA6BuB,EAAa,aAAA,UArB5D,IAAMC,EAANxB"}
1
+ {"version":3,"file":"SignerValidator.cjs","sources":["../../src/Validators/SignerValidator.ts"],"sourcesContent":["import {\n readSignerValidatorHashSignerData,\n readSignerValidatorSigners,\n signerValidatorAbi,\n simulateSignerValidatorSetAuthorized,\n simulateSignerValidatorSetValidatorCaller,\n simulateSignerValidatorValidate,\n writeSignerValidatorSetAuthorized,\n writeSignerValidatorSetValidatorCaller,\n writeSignerValidatorValidate,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/validators/SignerValidator.sol/SignerValidator.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n type PrivateKeyAccount,\n encodeAbiParameters,\n} from 'viem';\nimport { signTypedData } from 'viem/accounts';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { signerValidatorAbi };\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Signer Validator Claim Data Payload\n *\n * @export\n * @interface SignerValidatorClaimDataParams\n * @typedef {SignerValidatorClaimDataParams}\n */\nexport interface SignerValidatorClaimDataParams {\n /**\n * The signer with which to sign the input\n *\n * @type {{\n * account: Address;\n * key: Hex;\n * privateKey: PrivateKeyAccount;\n * }}\n */\n signer: {\n account: Address;\n key: Hex;\n privateKey: PrivateKeyAccount;\n };\n /**\n * The encoded data to provide the underlying incentive. You can use {@link prepareAllowListIncentivePayload}, {@link prepareCGDAIncentivePayload}, {@link prepareERC20IncentivePayload}, {@link prepareERC1155IncentivePayload}, or {@link preparePointsIncentivePayload}\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n /**\n * The chain id to target\n *\n * @type {number}\n */\n chainId: number;\n /**\n * The address of the validator\n *\n * @type {Address}\n */\n validator: Address;\n /**\n * The incentive quantity.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The ID of the boost\n *\n * @type {bigint}\n */\n boostId: bigint;\n}\n\n/**\n * Object representation of a {@link SignerValidatorInputParams} initialization payload\n *\n * @export\n * @interface SignerValidatorInputParams\n * @typedef {SignerValidatorInputParams}\n */\nexport interface SignerValidatorInputParams {\n /**\n * The signer address.\n *\n * @type {Address}\n */\n signer: Address;\n\n /**\n * The signature data.\n *\n * @type {string}\n */\n signature: Hex;\n\n /**\n * The incentive quantity.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n}\n\n/**\n * Object representing the payload for signing before validaton.\n *\n * @export\n * @interface SignerValidatorSignaturePayload\n * @typedef {SignerValidatorSignaturePayload}\n */\nexport interface SignerValidatorSignaturePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n}\n\n/**\n * A generic `viem.Log` event with support for `BoostCore` event types.\n *\n * @export\n * @typedef {SignerValidatorLog}\n * @template {ContractEventName<\n * typeof signerValidatorAbi\n * >} [event=ContractEventName<typeof signerValidatorAbi>]\n */\nexport type SignerValidatorLog<\n event extends ContractEventName<\n typeof signerValidatorAbi\n > = ContractEventName<typeof signerValidatorAbi>,\n> = GenericLog<typeof signerValidatorAbi, event>;\n\n/**\n * A simple implementation of a Validator that verifies a given signature and checks the recovered address against a set of authorized signers\n *\n * @export\n * @class SignerValidator\n * @typedef {SignerValidator}\n * @extends {DeployableTarget<SignerValidatorPayload>}\n */\nexport class SignerValidator extends DeployableTarget<\n SignerValidatorPayload,\n typeof signerValidatorAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = signerValidatorAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_SIGNER_VALIDATOR_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.VALIDATOR;\n\n /**\n * The set of authorized signers\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof signerValidatorAbi, 'signers'>} [params]\n * @returns {unknown}\n */\n public async signers(\n address: Address,\n params?: ReadParams<typeof signerValidatorAbi, 'signers'>,\n ) {\n return await readSignerValidatorSigners(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Retrieve the hash and signer data for a given hash\n *\n * @public\n * @async\n * @param {SignerValidatorSignaturePayload} payload\n * @param {?ReadParams<typeof signerValidatorAbi, 'hashSignerData'>} [params]\n * @returns {unknown}\n */\n public async hashSignerData(\n payload: SignerValidatorSignaturePayload,\n params?: ReadParams<typeof signerValidatorAbi, 'hashSignerData'>,\n ) {\n return await readSignerValidatorHashSignerData(this._config, {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveQuantity,\n payload.claimant,\n payload.incentiveData,\n ],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validate(\n payload: SignerValidatorValidatePayload,\n params?: WriteParams<typeof signerValidatorAbi, 'validate'>,\n ) {\n return await this.awaitResult(this.validateRaw(payload, params));\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validateRaw(\n payload: SignerValidatorValidatePayload,\n params?: ReadParams<typeof signerValidatorAbi, 'validate'>,\n ) {\n const { request, result } = await simulateSignerValidatorValidate(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveId,\n payload.claimant,\n payload.claimData,\n ],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorValidate(this._config, request);\n return { hash, result };\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]\n * @returns {unknown}\n */\n public async setAuthorized(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof signerValidatorAbi, 'setAuthorized'>,\n ) {\n return await this.awaitResult(\n this.setAuthorizedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]\n * @returns {unknown}\n */\n public async setAuthorizedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof signerValidatorAbi, 'setAuthorized'>,\n ) {\n const { request, result } = await simulateSignerValidatorSetAuthorized(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetAuthorized(this._config, request);\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>} [params]\n * @returns {unknown}\n */\n public async setValidatorCallerRaw(\n address: Address,\n params?: WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>,\n ) {\n const { request, result } = await simulateSignerValidatorSetValidatorCaller(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [address],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetValidatorCaller(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>} [params]\n * @returns {unknown}\n */\n public async setValidatorCaller(\n address: Address,\n params?: WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>,\n ) {\n return await this.awaitResult(this.setValidatorCallerRaw(address, params));\n }\n\n /**\n * Properly encodes the data needed to claim\n *\n * @public\n * @async\n * @param {SignerValidatorClaimDataParams} params\n * @returns {Promise<Hex>}\n */\n public async encodeClaimData(\n params: Omit<SignerValidatorClaimDataParams, 'validator'>,\n ): Promise<Hex> {\n return await prepareSignerValidatorClaimDataPayload({\n ...params,\n validator: this.assertValidAddress(),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SignerValidatorPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SignerValidatorPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: signerValidatorAbi,\n bytecode: bytecode as Hex,\n args: [prepareSignerValidatorPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Signer Validator Claim Data Payload Preparation\n *\n * @export\n * @async\n * @param {SignerValidatorClaimDataParams} param0\n * @param {{ account: Address; key: Hex; privateKey: PrivateKeyAccount; }} param0.signer\n * @param {Hex} param0.incentiveData\n * @param {number} param0.chainId\n * @param {Address} param0.validator\n * @param {number} param0.incentiveQuantity\n * @param {Address} param0.claimant\n * @param {bigint} param0.boostId\n * @returns {Promise<Hex>}\n */\nexport async function prepareSignerValidatorClaimDataPayload({\n signer,\n incentiveData,\n chainId,\n validator,\n incentiveQuantity,\n claimant,\n boostId,\n}: SignerValidatorClaimDataParams): Promise<Hex> {\n const domain = {\n name: 'SignerValidator',\n version: '1',\n chainId: chainId,\n verifyingContract: validator,\n };\n const typedData = {\n domain,\n types: {\n SignerValidatorData: [\n { name: 'boostId', type: 'uint256' },\n { name: 'incentiveQuantity', type: 'uint8' },\n { name: 'claimant', type: 'address' },\n { name: 'incentiveData', type: 'bytes' },\n ],\n },\n primaryType: 'SignerValidatorData' as const,\n message: {\n boostId,\n incentiveQuantity,\n claimant,\n incentiveData: incentiveData,\n },\n };\n\n const trustedSignature = await signTypedData({\n ...typedData,\n privateKey: signer.key,\n });\n\n // Prepare the claim data payload using the new helper\n const validatorData = prepareSignerValidatorInputParams({\n signer: signer.account,\n signature: trustedSignature,\n incentiveQuantity, // Adjust incentive quantity as necessary\n });\n\n const boostClaimDataPayload = encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n [{ validatorData, incentiveData }],\n );\n\n return boostClaimDataPayload;\n}\n\n/**\n * Given a {@link SignerValidatorInputParams}, properly encode the initialization payload.\n *\n * @param {SignerValidatorInputParams} param0\n * @param {Address} param0.signer\n * @param {Hex} param0.signature\n * @param {number} param0.incentiveQuantity\n * @returns {Hex}\n */\nexport function prepareSignerValidatorInputParams({\n signer,\n signature,\n incentiveQuantity,\n}: SignerValidatorInputParams) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'SignerValidatorInputParams',\n components: [\n { type: 'address', name: 'signer' },\n { type: 'bytes', name: 'signature' },\n { type: 'uint8', name: 'incentiveQuantity' },\n ],\n },\n ],\n [{ signer, signature, incentiveQuantity }],\n );\n}\n\n/**\n * Given a {@link SignerValidatorPayload}, properly encode the initialization payload.\n *\n * @param {SignerValidatorPayload} param0\n * @param {Address[]} param0.signers\n * @param {Address} param0.validatorCaller\n * @returns {Hex}\n */\nexport function prepareSignerValidatorPayload({\n signers,\n validatorCaller,\n}: SignerValidatorPayload) {\n return encodeAbiParameters(\n [\n { type: 'address[]', name: 'signers' },\n { type: 'address', name: 'validatorCaller' },\n ],\n [signers, validatorCaller],\n );\n}\n"],"names":["_SignerValidator","DeployableTarget","signerValidatorAbi","address","params","readSignerValidatorSigners","payload","readSignerValidatorHashSignerData","request","result","simulateSignerValidatorValidate","writeSignerValidatorValidate","addresses","allowed","simulateSignerValidatorSetAuthorized","writeSignerValidatorSetAuthorized","simulateSignerValidatorSetValidatorCaller","writeSignerValidatorSetValidatorCaller","prepareSignerValidatorClaimDataPayload","_payload","_options","options","bytecode","prepareSignerValidatorPayload","RegistryType","SignerValidator","signer","incentiveData","chainId","validator","incentiveQuantity","claimant","boostId","typedData","trustedSignature","signTypedData","validatorData","prepareSignerValidatorInputParams","encodeAbiParameters","signature","signers","validatorCaller"],"mappings":"u6hBAmSaA,EAAN,MAAMA,UAAwBC,EAAAA,gBAGnC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAWL,KAAyB,IAAMC,GAAA,CA4B/B,MAAa,QACXC,EACAC,EACA,CACO,OAAA,MAAMC,EAAAA,GAA2B,KAAK,QAAS,CACpD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACF,CAAO,EAEd,GAAIC,CAAA,CACL,CACH,CAWA,MAAa,eACXE,EACAF,EACA,CACO,OAAA,MAAMG,EAAAA,GAAkC,KAAK,QAAS,CAC3D,QAAS,KAAK,mBAAmB,EACjC,KAAM,CACJD,EAAQ,QACRA,EAAQ,kBACRA,EAAQ,SACRA,EAAQ,aACV,EAEA,GAAIF,CAAA,CACL,CACH,CAWA,MAAgB,SACdE,EACAF,EACA,CACA,OAAO,MAAM,KAAK,YAAY,KAAK,YAAYE,EAASF,CAAM,CAAC,CACjE,CAWA,MAAgB,YACdE,EACAF,EACA,CACA,KAAM,CAAE,QAAAI,EAAS,OAAAC,CAAO,EAAI,MAAMC,EAAA,GAChC,KAAK,QACL,CACE,QAAS,KAAK,mBAAmB,EACjC,KAAM,CACJJ,EAAQ,QACRA,EAAQ,YACRA,EAAQ,SACRA,EAAQ,SACV,EACA,GAAG,KAAK,wBAAwB,EAEhC,GAAIF,CACN,CAAA,EAGK,MAAA,CAAE,KADI,MAAMO,EAA6B,GAAA,KAAK,QAASH,CAAO,EACtD,OAAAC,EACjB,CAYA,MAAa,cACXG,EACAC,EACAT,EACA,CACA,OAAO,MAAM,KAAK,YAChB,KAAK,iBAAiBQ,EAAWC,EAAST,CAAM,CAAA,CAEpD,CAYA,MAAa,iBACXQ,EACAC,EACAT,EACA,CACA,KAAM,CAAE,QAAAI,EAAS,OAAAC,CAAO,EAAI,MAAM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boostxyz/evm';
2
- import type { Address, ContractEventName } from 'viem';
2
+ import { type Address, type ContractEventName, type Hex, type PrivateKeyAccount } from 'viem';
3
3
  import type { DeployableOptions, GenericDeployableParams } from '../Deployable/Deployable';
4
4
  import { DeployableTarget } from '../Deployable/DeployableTarget';
5
- import { type GenericLog, type ReadParams, RegistryType, type SignerValidatorPayload, type SignerValidatorSignaturePayload, type SignerValidatorValidatePayload, type WriteParams } from '../utils';
5
+ import { type GenericLog, type ReadParams, RegistryType, type WriteParams } from '../utils';
6
6
  export { signerValidatorAbi };
7
- export type { SignerValidatorPayload };
7
+ /**
8
+ * Object reprentation of a {@link SignerValidator} initialization payload
9
+ *
10
+ * @export
11
+ * @interface SignerValidatorPayload
12
+ * @typedef {SignerValidatorPayload}
13
+ */
14
+ export interface SignerValidatorPayload {
15
+ /**
16
+ * The list of authorized signers. The first address in the list will be the initial owner of the contract.
17
+ *
18
+ * @type {Address[]}
19
+ */
20
+ signers: Address[];
21
+ /**
22
+ * The authorized caller of the {@link prepareSignerValidator} function
23
+ * @type {Address}
24
+ */
25
+ validatorCaller: Address;
26
+ }
27
+ /**
28
+ * Description placeholder
29
+ *
30
+ * @export
31
+ * @interface SignerValidatorValidatePayload
32
+ * @typedef {SignerValidatorValidatePayload}
33
+ */
34
+ export interface SignerValidatorValidatePayload {
35
+ /**
36
+ * The ID of the boost.
37
+ *
38
+ * @type {bigint}
39
+ */
40
+ boostId: bigint;
41
+ /**
42
+ * The ID of the incentive.
43
+ *
44
+ * @type {bigint}
45
+ */
46
+ incentiveId: bigint;
47
+ /**
48
+ * The address of the claimant.
49
+ *
50
+ * @type {Address}
51
+ */
52
+ claimant: Address;
53
+ /**
54
+ * The claim data.
55
+ *
56
+ * @type {Hex}
57
+ */
58
+ claimData: Hex;
59
+ }
60
+ /**
61
+ * Object reprentation of a {@link SignerValidator} initialization payload
62
+ *
63
+ * @export
64
+ * @interface SignerValidatorPayload
65
+ * @typedef {SignerValidatorPayload}
66
+ */
67
+ export interface SignerValidatorPayload {
68
+ /**
69
+ * The list of authorized signers. The first address in the list will be the initial owner of the contract.
70
+ *
71
+ * @type {Address[]}
72
+ */
73
+ signers: Address[];
74
+ /**
75
+ * The authorized caller of the {@link prepareSignerValidator} function
76
+ * @type {Address}
77
+ */
78
+ validatorCaller: Address;
79
+ }
80
+ /**
81
+ * Description placeholder
82
+ *
83
+ * @export
84
+ * @interface SignerValidatorValidatePayload
85
+ * @typedef {SignerValidatorValidatePayload}
86
+ */
87
+ export interface SignerValidatorValidatePayload {
88
+ /**
89
+ * The ID of the boost.
90
+ *
91
+ * @type {bigint}
92
+ */
93
+ boostId: bigint;
94
+ /**
95
+ * The ID of the incentive.
96
+ *
97
+ * @type {bigint}
98
+ */
99
+ incentiveId: bigint;
100
+ /**
101
+ * The address of the claimant.
102
+ *
103
+ * @type {Address}
104
+ */
105
+ claimant: Address;
106
+ /**
107
+ * The claim data.
108
+ *
109
+ * @type {Hex}
110
+ */
111
+ claimData: Hex;
112
+ }
113
+ /**
114
+ * Signer Validator Claim Data Payload
115
+ *
116
+ * @export
117
+ * @interface SignerValidatorClaimDataParams
118
+ * @typedef {SignerValidatorClaimDataParams}
119
+ */
120
+ export interface SignerValidatorClaimDataParams {
121
+ /**
122
+ * The signer with which to sign the input
123
+ *
124
+ * @type {{
125
+ * account: Address;
126
+ * key: Hex;
127
+ * privateKey: PrivateKeyAccount;
128
+ * }}
129
+ */
130
+ signer: {
131
+ account: Address;
132
+ key: Hex;
133
+ privateKey: PrivateKeyAccount;
134
+ };
135
+ /**
136
+ * The encoded data to provide the underlying incentive. You can use {@link prepareAllowListIncentivePayload}, {@link prepareCGDAIncentivePayload}, {@link prepareERC20IncentivePayload}, {@link prepareERC1155IncentivePayload}, or {@link preparePointsIncentivePayload}
137
+ *
138
+ * @type {Hex}
139
+ */
140
+ incentiveData: Hex;
141
+ /**
142
+ * The chain id to target
143
+ *
144
+ * @type {number}
145
+ */
146
+ chainId: number;
147
+ /**
148
+ * The address of the validator
149
+ *
150
+ * @type {Address}
151
+ */
152
+ validator: Address;
153
+ /**
154
+ * The incentive quantity.
155
+ *
156
+ * @type {number}
157
+ */
158
+ incentiveQuantity: number;
159
+ /**
160
+ * The address of the claimant
161
+ *
162
+ * @type {Address}
163
+ */
164
+ claimant: Address;
165
+ /**
166
+ * The ID of the boost
167
+ *
168
+ * @type {bigint}
169
+ */
170
+ boostId: bigint;
171
+ }
172
+ /**
173
+ * Object representation of a {@link SignerValidatorInputParams} initialization payload
174
+ *
175
+ * @export
176
+ * @interface SignerValidatorInputParams
177
+ * @typedef {SignerValidatorInputParams}
178
+ */
179
+ export interface SignerValidatorInputParams {
180
+ /**
181
+ * The signer address.
182
+ *
183
+ * @type {Address}
184
+ */
185
+ signer: Address;
186
+ /**
187
+ * The signature data.
188
+ *
189
+ * @type {string}
190
+ */
191
+ signature: Hex;
192
+ /**
193
+ * The incentive quantity.
194
+ *
195
+ * @type {number}
196
+ */
197
+ incentiveQuantity: number;
198
+ }
199
+ /**
200
+ * Object representing the payload for signing before validaton.
201
+ *
202
+ * @export
203
+ * @interface SignerValidatorSignaturePayload
204
+ * @typedef {SignerValidatorSignaturePayload}
205
+ */
206
+ export interface SignerValidatorSignaturePayload {
207
+ /**
208
+ * The ID of the boost.
209
+ *
210
+ * @type {bigint}
211
+ */
212
+ boostId: bigint;
213
+ /**
214
+ * The ID of the incentive.
215
+ *
216
+ * @type {number}
217
+ */
218
+ incentiveQuantity: number;
219
+ /**
220
+ * The address of the claimant.
221
+ *
222
+ * @type {Address}
223
+ */
224
+ claimant: Address;
225
+ /**
226
+ * The claim data.
227
+ *
228
+ * @type {Hex}
229
+ */
230
+ incentiveData: Hex;
231
+ }
8
232
  /**
9
233
  * A generic `viem.Log` event with support for `BoostCore` event types.
10
234
  *
@@ -24,6 +248,13 @@ export type SignerValidatorLog<event extends ContractEventName<typeof signerVali
24
248
  * @extends {DeployableTarget<SignerValidatorPayload>}
25
249
  */
26
250
  export declare class SignerValidator extends DeployableTarget<SignerValidatorPayload, typeof signerValidatorAbi> {
251
+ /**
252
+ * @inheritdoc
253
+ *
254
+ * @public
255
+ * @readonly
256
+ * @type {*}
257
+ */
27
258
  readonly abi: readonly [{
28
259
  readonly type: "constructor";
29
260
  readonly inputs: readonly [];
@@ -395,7 +626,7 @@ export declare class SignerValidator extends DeployableTarget<SignerValidatorPay
395
626
  * @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]
396
627
  * @returns {Promise<boolean>} - True if the action has been validated based on the data payload
397
628
  */
398
- validate(payload: SignerValidatorValidatePayload, params?: WriteParams<typeof signerValidatorAbi, 'validate'>): Promise<boolean>;
629
+ protected validate(payload: SignerValidatorValidatePayload, params?: WriteParams<typeof signerValidatorAbi, 'validate'>): Promise<boolean>;
399
630
  /**
400
631
  * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.
401
632
  *
@@ -405,7 +636,7 @@ export declare class SignerValidator extends DeployableTarget<SignerValidatorPay
405
636
  * @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]
406
637
  * @returns {Promise<boolean>} - True if the action has been validated based on the data payload
407
638
  */
408
- validateRaw(payload: SignerValidatorValidatePayload, params?: ReadParams<typeof signerValidatorAbi, 'validate'>): Promise<{
639
+ protected validateRaw(payload: SignerValidatorValidatePayload, params?: ReadParams<typeof signerValidatorAbi, 'validate'>): Promise<{
409
640
  hash: `0x${string}`;
410
641
  result: boolean;
411
642
  }>;
@@ -434,11 +665,38 @@ export declare class SignerValidator extends DeployableTarget<SignerValidatorPay
434
665
  hash: `0x${string}`;
435
666
  result: void;
436
667
  }>;
668
+ /**
669
+ * Update the authorized caller of the validator function
670
+ *
671
+ * @public
672
+ * @async
673
+ * @param {Address} address
674
+ * @param {?WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>} [params]
675
+ * @returns {unknown}
676
+ */
437
677
  setValidatorCallerRaw(address: Address, params?: WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>): Promise<{
438
678
  hash: `0x${string}`;
439
679
  result: void;
440
680
  }>;
681
+ /**
682
+ * Update the authorized caller of the validator function
683
+ *
684
+ * @public
685
+ * @async
686
+ * @param {Address} address
687
+ * @param {?WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>} [params]
688
+ * @returns {unknown}
689
+ */
441
690
  setValidatorCaller(address: Address, params?: WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>): Promise<void>;
691
+ /**
692
+ * Properly encodes the data needed to claim
693
+ *
694
+ * @public
695
+ * @async
696
+ * @param {SignerValidatorClaimDataParams} params
697
+ * @returns {Promise<Hex>}
698
+ */
699
+ encodeClaimData(params: Omit<SignerValidatorClaimDataParams, 'validator'>): Promise<Hex>;
442
700
  /**
443
701
  * @inheritdoc
444
702
  *
@@ -449,4 +707,39 @@ export declare class SignerValidator extends DeployableTarget<SignerValidatorPay
449
707
  */
450
708
  buildParameters(_payload?: SignerValidatorPayload, _options?: DeployableOptions): GenericDeployableParams;
451
709
  }
710
+ /**
711
+ * Signer Validator Claim Data Payload Preparation
712
+ *
713
+ * @export
714
+ * @async
715
+ * @param {SignerValidatorClaimDataParams} param0
716
+ * @param {{ account: Address; key: Hex; privateKey: PrivateKeyAccount; }} param0.signer
717
+ * @param {Hex} param0.incentiveData
718
+ * @param {number} param0.chainId
719
+ * @param {Address} param0.validator
720
+ * @param {number} param0.incentiveQuantity
721
+ * @param {Address} param0.claimant
722
+ * @param {bigint} param0.boostId
723
+ * @returns {Promise<Hex>}
724
+ */
725
+ export declare function prepareSignerValidatorClaimDataPayload({ signer, incentiveData, chainId, validator, incentiveQuantity, claimant, boostId, }: SignerValidatorClaimDataParams): Promise<Hex>;
726
+ /**
727
+ * Given a {@link SignerValidatorInputParams}, properly encode the initialization payload.
728
+ *
729
+ * @param {SignerValidatorInputParams} param0
730
+ * @param {Address} param0.signer
731
+ * @param {Hex} param0.signature
732
+ * @param {number} param0.incentiveQuantity
733
+ * @returns {Hex}
734
+ */
735
+ export declare function prepareSignerValidatorInputParams({ signer, signature, incentiveQuantity, }: SignerValidatorInputParams): `0x${string}`;
736
+ /**
737
+ * Given a {@link SignerValidatorPayload}, properly encode the initialization payload.
738
+ *
739
+ * @param {SignerValidatorPayload} param0
740
+ * @param {Address[]} param0.signers
741
+ * @param {Address} param0.validatorCaller
742
+ * @returns {Hex}
743
+ */
744
+ export declare function prepareSignerValidatorPayload({ signers, validatorCaller, }: SignerValidatorPayload): `0x${string}`;
452
745
  //# sourceMappingURL=SignerValidator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignerValidator.d.ts","sourceRoot":"","sources":["../../src/Validators/SignerValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAOnB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAO,MAAM,MAAM,CAAC;AAC5D,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,sBAAsB,EAC3B,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EACnC,KAAK,WAAW,EAEjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,sBAAsB,EAAE,CAAC;AAEvC;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,CAC5B,KAAK,SAAS,iBAAiB,CAC7B,OAAO,kBAAkB,CAC1B,GAAG,iBAAiB,CAAC,OAAO,kBAAkB,CAAC,IAC9C,UAAU,CAAC,OAAO,kBAAkB,EAAE,KAAK,CAAC,CAAC;AAEjD;;;;;;;GAOG;AACH,qBAAa,eAAgB,SAAQ,gBAAgB,CACnD,sBAAsB,EACtB,OAA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