@snapshot-labs/snapshot.js 0.11.28 → 0.11.29

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.
@@ -3823,6 +3823,16 @@ ajv.addFormat('address', {
3823
3823
  }
3824
3824
  }
3825
3825
  });
3826
+ ajv.addFormat('evmOrStarknetAddress', {
3827
+ validate: function (value) {
3828
+ try {
3829
+ return address.isAddress(value) || /^0x[0-9a-fA-F]{62,64}$/.test(value);
3830
+ }
3831
+ catch (err) {
3832
+ return false;
3833
+ }
3834
+ }
3835
+ });
3826
3836
  ajv.addFormat('long', {
3827
3837
  validate: function () { return true; }
3828
3838
  });
@@ -3813,6 +3813,16 @@ ajv.addFormat('address', {
3813
3813
  }
3814
3814
  }
3815
3815
  });
3816
+ ajv.addFormat('evmOrStarknetAddress', {
3817
+ validate: function (value) {
3818
+ try {
3819
+ return isAddress(value) || /^0x[0-9a-fA-F]{62,64}$/.test(value);
3820
+ }
3821
+ catch (err) {
3822
+ return false;
3823
+ }
3824
+ }
3825
+ });
3816
3826
  ajv.addFormat('long', {
3817
3827
  validate: function () { return true; }
3818
3828
  });