'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var web3_js = require('@solarti/web3.js');

const toPublicKey = value => {
  // m17, vanilla,  compile error due to maybe compiler bug
  // if (typeof value === 'object' && 'publicKey' in value) {
  //   return value.publicKey;
  // } 

  // if (typeof value === 'object' && 'address' in value) {
  //   return value.address;
  // }

  if (typeof value === 'object') {
    if ('publicKey' in value) {
      return value.publicKey;
    }
    if ('address' in value) {
      return value.address;
    }
  }
  return new web3_js.PublicKey(value);
};

Object.defineProperty(exports, 'PublicKey', {
  enumerable: true,
  get: function () { return web3_js.PublicKey; }
});
exports.toPublicKey = toPublicKey;
//# sourceMappingURL=PublicKey.cjs.map
