[
  {
    "__docId__": 1,
    "kind": "external",
    "name": "Infinity",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Infinity",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 2,
    "kind": "external",
    "name": "NaN",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~NaN",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 3,
    "kind": "external",
    "name": "undefined",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~undefined",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 4,
    "kind": "external",
    "name": "null",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~null",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 5,
    "kind": "external",
    "name": "Object",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Object",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 6,
    "kind": "external",
    "name": "object",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~object",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 7,
    "kind": "external",
    "name": "Function",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Function",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 8,
    "kind": "external",
    "name": "function",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~function",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 9,
    "kind": "external",
    "name": "Boolean",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Boolean",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 10,
    "kind": "external",
    "name": "boolean",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~boolean",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 11,
    "kind": "external",
    "name": "Symbol",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Symbol",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 12,
    "kind": "external",
    "name": "Error",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Error",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 13,
    "kind": "external",
    "name": "EvalError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~EvalError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 14,
    "kind": "external",
    "name": "InternalError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~InternalError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 15,
    "kind": "external",
    "name": "RangeError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~RangeError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 16,
    "kind": "external",
    "name": "ReferenceError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~ReferenceError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 17,
    "kind": "external",
    "name": "SyntaxError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~SyntaxError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 18,
    "kind": "external",
    "name": "TypeError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~TypeError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 19,
    "kind": "external",
    "name": "URIError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~URIError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 20,
    "kind": "external",
    "name": "Number",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Number",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 21,
    "kind": "external",
    "name": "number",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~number",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 22,
    "kind": "external",
    "name": "Date",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Date",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 23,
    "kind": "external",
    "name": "String",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~String",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 24,
    "kind": "external",
    "name": "string",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~string",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 25,
    "kind": "external",
    "name": "RegExp",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~RegExp",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 26,
    "kind": "external",
    "name": "Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 27,
    "kind": "external",
    "name": "Int8Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Int8Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 28,
    "kind": "external",
    "name": "Uint8Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Uint8Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 29,
    "kind": "external",
    "name": "Uint8ClampedArray",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Uint8ClampedArray",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 30,
    "kind": "external",
    "name": "Int16Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Int16Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 31,
    "kind": "external",
    "name": "Uint16Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Uint16Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 32,
    "kind": "external",
    "name": "Int32Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Int32Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 33,
    "kind": "external",
    "name": "Uint32Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Uint32Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 34,
    "kind": "external",
    "name": "Float32Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Float32Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 35,
    "kind": "external",
    "name": "Float64Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Float64Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 36,
    "kind": "external",
    "name": "Map",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Map",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 37,
    "kind": "external",
    "name": "Set",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Set",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 38,
    "kind": "external",
    "name": "WeakMap",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~WeakMap",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 39,
    "kind": "external",
    "name": "WeakSet",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~WeakSet",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 40,
    "kind": "external",
    "name": "ArrayBuffer",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~ArrayBuffer",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 41,
    "kind": "external",
    "name": "DataView",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~DataView",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 42,
    "kind": "external",
    "name": "JSON",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~JSON",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 43,
    "kind": "external",
    "name": "Promise",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Promise",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 44,
    "kind": "external",
    "name": "Generator",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Generator",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 45,
    "kind": "external",
    "name": "GeneratorFunction",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~GeneratorFunction",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 46,
    "kind": "external",
    "name": "Reflect",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Reflect",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 47,
    "kind": "external",
    "name": "Proxy",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy",
    "memberof": "src/.external-ecmascript.js",
    "static": true,
    "longname": "src/.external-ecmascript.js~Proxy",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 48,
    "kind": "file",
    "name": "src/exceptions.js",
    "content": "/**\r\n * Base exception that all libsimba Exceptions extend\r\n */\r\nexport class BaseException extends Error{\r\n    /**\r\n     * Base exception that all libsimba Exceptions extend\r\n     * @param {string} message - the error message\r\n     * @param {Error|string} [cause] - (Optional) wrap an existing error\r\n     */\r\n    constructor(message, cause){\r\n        super();\r\n        this.name = 'BaseException';\r\n\r\n        if('response' in message){\r\n            this.message = message.response.data;\r\n            this.cause = cause || message;\r\n        }else{\r\n            this.message = message;\r\n            this.cause = cause;\r\n        }\r\n\r\n        // Maintains proper stack trace for where our error was thrown (only available on V8)\r\n        if (Error.captureStackTrace) {\r\n            Error.captureStackTrace(this, this.constructor);\r\n        }\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when a method that should be implemented is not\r\n */\r\nexport class NotImplementedException extends BaseException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'NotImplementedException';\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when a method on a class inheriting [SimbaBase]{@link SimbaBase} is called before\r\n * metadata is retrieved.\r\n */\r\nexport class MissingMetadataException extends BaseException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'MissingMetadataException';\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when metadata doesn't have something it should have\r\n */\r\nexport class BadMetadataException extends BaseException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'BadMetadataException';\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when a method call isn't valid\r\n */\r\nexport class MethodCallValidationMetadataException extends BaseException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'MethodCallValidationMetadataException';\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when the server fails to generate the transaction for signing\r\n */\r\nexport class GenerateTransactionException extends BaseException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'GenerateTransactionException';\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when the server returns an error after submitting a signed transaction\r\n */\r\nexport class SubmitTransactionException extends BaseException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'SubmitTransactionException';\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when the server returns an error when querying transactions\r\n */\r\nexport class GetRequestException extends BaseException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'GetRequestException';\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when the server returns an error when querying transactions\r\n */\r\nexport class PostRequestException extends BaseException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'PostRequestException';\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when the server returns an error when querying transactions\r\n */\r\nexport class GetTransactionsException extends GetRequestException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'GetTransactionsException';\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when an error occurs checking a transactions status\r\n */\r\nexport class TransactionStatusCheckException extends BaseException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'TransactionStatusCheckException';\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when there's an error signing a transaction\r\n */\r\nexport class SigningException extends BaseException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'SigningException';\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when a LocalWallet is created in a non browser environment\r\n */\r\nexport class NotInBrowserException extends BaseException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'NotInBrowserException';\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when the user rejects the request to sign\r\n */\r\nexport class UserRejectedSigningException extends SigningException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'UserRejectedSigningException';\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when a method on a class inheriting [SimbaBase]{@link SimbaBase} is called that requires\r\n * a [Wallet]{@link Wallet} to be set, and it isn't.\r\n */\r\nexport class WalletNotFoundException extends SigningException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'WalletNotFoundException';\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when a method on a class inheriting [SimbaBase]{@link SimbaBase} is called that requires\r\n * a [Wallet]{@link Wallet} to be unlocked, and it isn't.\r\n */\r\nexport class WalletLockedException extends SigningException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'WalletLockedException';\r\n    }\r\n}\r\n\r\n/**\r\n * Thrown when a method call exceeds the max retries\r\n */\r\nexport class RetriesExceededException extends SigningException{\r\n    constructor(...args){\r\n        super(...args);\r\n        this.name = 'RetriesExceededException';\r\n    }\r\n}\r\n\r\n",
    "static": true,
    "longname": "C:/Users/keyz/Code/libsimba-js/src/exceptions.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 49,
    "kind": "class",
    "name": "BaseException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~BaseException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{BaseException}",
    "description": "Base exception that all libsimba Exceptions extend",
    "lineNumber": 4,
    "interface": false,
    "extends": [
      "Error"
    ]
  },
  {
    "__docId__": 50,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~BaseException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~BaseException#constructor",
    "access": "public",
    "description": "Base exception that all libsimba Exceptions extend",
    "lineNumber": 10,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "message",
        "description": "the error message"
      },
      {
        "nullable": null,
        "types": [
          "Error",
          "string"
        ],
        "spread": false,
        "optional": true,
        "name": "cause",
        "description": "(Optional) wrap an existing error"
      }
    ]
  },
  {
    "__docId__": 51,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~BaseException",
    "static": false,
    "longname": "src/exceptions.js~BaseException#name",
    "access": "public",
    "description": null,
    "lineNumber": 12,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 52,
    "kind": "member",
    "name": "message",
    "memberof": "src/exceptions.js~BaseException",
    "static": false,
    "longname": "src/exceptions.js~BaseException#message",
    "access": "public",
    "description": null,
    "lineNumber": 15,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 53,
    "kind": "member",
    "name": "cause",
    "memberof": "src/exceptions.js~BaseException",
    "static": false,
    "longname": "src/exceptions.js~BaseException#cause",
    "access": "public",
    "description": null,
    "lineNumber": 16,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 56,
    "kind": "class",
    "name": "NotImplementedException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~NotImplementedException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{NotImplementedException}",
    "description": "Thrown when a method that should be implemented is not",
    "lineNumber": 32,
    "interface": false,
    "extends": [
      "BaseException"
    ]
  },
  {
    "__docId__": 57,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~NotImplementedException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~NotImplementedException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 33,
    "undocument": true
  },
  {
    "__docId__": 58,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~NotImplementedException",
    "static": false,
    "longname": "src/exceptions.js~NotImplementedException#name",
    "access": "public",
    "description": null,
    "lineNumber": 35,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 59,
    "kind": "class",
    "name": "MissingMetadataException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~MissingMetadataException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{MissingMetadataException}",
    "description": "Thrown when a method on a class inheriting [SimbaBase]{@link SimbaBase} is called before\nmetadata is retrieved.",
    "lineNumber": 43,
    "interface": false,
    "extends": [
      "BaseException"
    ]
  },
  {
    "__docId__": 60,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~MissingMetadataException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~MissingMetadataException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 44,
    "undocument": true
  },
  {
    "__docId__": 61,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~MissingMetadataException",
    "static": false,
    "longname": "src/exceptions.js~MissingMetadataException#name",
    "access": "public",
    "description": null,
    "lineNumber": 46,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 62,
    "kind": "class",
    "name": "BadMetadataException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~BadMetadataException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{BadMetadataException}",
    "description": "Thrown when metadata doesn't have something it should have",
    "lineNumber": 53,
    "interface": false,
    "extends": [
      "BaseException"
    ]
  },
  {
    "__docId__": 63,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~BadMetadataException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~BadMetadataException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 54,
    "undocument": true
  },
  {
    "__docId__": 64,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~BadMetadataException",
    "static": false,
    "longname": "src/exceptions.js~BadMetadataException#name",
    "access": "public",
    "description": null,
    "lineNumber": 56,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 65,
    "kind": "class",
    "name": "MethodCallValidationMetadataException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~MethodCallValidationMetadataException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{MethodCallValidationMetadataException}",
    "description": "Thrown when a method call isn't valid",
    "lineNumber": 63,
    "interface": false,
    "extends": [
      "BaseException"
    ]
  },
  {
    "__docId__": 66,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~MethodCallValidationMetadataException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~MethodCallValidationMetadataException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 64,
    "undocument": true
  },
  {
    "__docId__": 67,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~MethodCallValidationMetadataException",
    "static": false,
    "longname": "src/exceptions.js~MethodCallValidationMetadataException#name",
    "access": "public",
    "description": null,
    "lineNumber": 66,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 68,
    "kind": "class",
    "name": "GenerateTransactionException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~GenerateTransactionException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{GenerateTransactionException}",
    "description": "Thrown when the server fails to generate the transaction for signing",
    "lineNumber": 73,
    "interface": false,
    "extends": [
      "BaseException"
    ]
  },
  {
    "__docId__": 69,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~GenerateTransactionException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~GenerateTransactionException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 74,
    "undocument": true
  },
  {
    "__docId__": 70,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~GenerateTransactionException",
    "static": false,
    "longname": "src/exceptions.js~GenerateTransactionException#name",
    "access": "public",
    "description": null,
    "lineNumber": 76,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 71,
    "kind": "class",
    "name": "SubmitTransactionException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~SubmitTransactionException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{SubmitTransactionException}",
    "description": "Thrown when the server returns an error after submitting a signed transaction",
    "lineNumber": 83,
    "interface": false,
    "extends": [
      "BaseException"
    ]
  },
  {
    "__docId__": 72,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~SubmitTransactionException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~SubmitTransactionException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 84,
    "undocument": true
  },
  {
    "__docId__": 73,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~SubmitTransactionException",
    "static": false,
    "longname": "src/exceptions.js~SubmitTransactionException#name",
    "access": "public",
    "description": null,
    "lineNumber": 86,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 74,
    "kind": "class",
    "name": "GetRequestException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~GetRequestException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{GetRequestException}",
    "description": "Thrown when the server returns an error when querying transactions",
    "lineNumber": 93,
    "interface": false,
    "extends": [
      "BaseException"
    ]
  },
  {
    "__docId__": 75,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~GetRequestException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~GetRequestException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 94,
    "undocument": true
  },
  {
    "__docId__": 76,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~GetRequestException",
    "static": false,
    "longname": "src/exceptions.js~GetRequestException#name",
    "access": "public",
    "description": null,
    "lineNumber": 96,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 77,
    "kind": "class",
    "name": "PostRequestException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~PostRequestException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{PostRequestException}",
    "description": "Thrown when the server returns an error when querying transactions",
    "lineNumber": 103,
    "interface": false,
    "extends": [
      "BaseException"
    ]
  },
  {
    "__docId__": 78,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~PostRequestException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~PostRequestException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 104,
    "undocument": true
  },
  {
    "__docId__": 79,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~PostRequestException",
    "static": false,
    "longname": "src/exceptions.js~PostRequestException#name",
    "access": "public",
    "description": null,
    "lineNumber": 106,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 80,
    "kind": "class",
    "name": "GetTransactionsException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~GetTransactionsException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{GetTransactionsException}",
    "description": "Thrown when the server returns an error when querying transactions",
    "lineNumber": 113,
    "interface": false,
    "extends": [
      "GetRequestException"
    ]
  },
  {
    "__docId__": 81,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~GetTransactionsException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~GetTransactionsException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 114,
    "undocument": true
  },
  {
    "__docId__": 82,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~GetTransactionsException",
    "static": false,
    "longname": "src/exceptions.js~GetTransactionsException#name",
    "access": "public",
    "description": null,
    "lineNumber": 116,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 83,
    "kind": "class",
    "name": "TransactionStatusCheckException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~TransactionStatusCheckException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{TransactionStatusCheckException}",
    "description": "Thrown when an error occurs checking a transactions status",
    "lineNumber": 123,
    "interface": false,
    "extends": [
      "BaseException"
    ]
  },
  {
    "__docId__": 84,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~TransactionStatusCheckException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~TransactionStatusCheckException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 124,
    "undocument": true
  },
  {
    "__docId__": 85,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~TransactionStatusCheckException",
    "static": false,
    "longname": "src/exceptions.js~TransactionStatusCheckException#name",
    "access": "public",
    "description": null,
    "lineNumber": 126,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 86,
    "kind": "class",
    "name": "SigningException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~SigningException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{SigningException}",
    "description": "Thrown when there's an error signing a transaction",
    "lineNumber": 133,
    "interface": false,
    "extends": [
      "BaseException"
    ]
  },
  {
    "__docId__": 87,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~SigningException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~SigningException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 134,
    "undocument": true
  },
  {
    "__docId__": 88,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~SigningException",
    "static": false,
    "longname": "src/exceptions.js~SigningException#name",
    "access": "public",
    "description": null,
    "lineNumber": 136,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 89,
    "kind": "class",
    "name": "NotInBrowserException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~NotInBrowserException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{NotInBrowserException}",
    "description": "Thrown when a LocalWallet is created in a non browser environment",
    "lineNumber": 143,
    "interface": false,
    "extends": [
      "BaseException"
    ]
  },
  {
    "__docId__": 90,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~NotInBrowserException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~NotInBrowserException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 144,
    "undocument": true
  },
  {
    "__docId__": 91,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~NotInBrowserException",
    "static": false,
    "longname": "src/exceptions.js~NotInBrowserException#name",
    "access": "public",
    "description": null,
    "lineNumber": 146,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 92,
    "kind": "class",
    "name": "UserRejectedSigningException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~UserRejectedSigningException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{UserRejectedSigningException}",
    "description": "Thrown when the user rejects the request to sign",
    "lineNumber": 153,
    "interface": false,
    "extends": [
      "SigningException"
    ]
  },
  {
    "__docId__": 93,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~UserRejectedSigningException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~UserRejectedSigningException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 154,
    "undocument": true
  },
  {
    "__docId__": 94,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~UserRejectedSigningException",
    "static": false,
    "longname": "src/exceptions.js~UserRejectedSigningException#name",
    "access": "public",
    "description": null,
    "lineNumber": 156,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 95,
    "kind": "class",
    "name": "WalletNotFoundException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~WalletNotFoundException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{WalletNotFoundException}",
    "description": "Thrown when a method on a class inheriting [SimbaBase]{@link SimbaBase} is called that requires\na [Wallet]{@link Wallet} to be set, and it isn't.",
    "lineNumber": 164,
    "interface": false,
    "extends": [
      "SigningException"
    ]
  },
  {
    "__docId__": 96,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~WalletNotFoundException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~WalletNotFoundException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 165,
    "undocument": true
  },
  {
    "__docId__": 97,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~WalletNotFoundException",
    "static": false,
    "longname": "src/exceptions.js~WalletNotFoundException#name",
    "access": "public",
    "description": null,
    "lineNumber": 167,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 98,
    "kind": "class",
    "name": "WalletLockedException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~WalletLockedException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{WalletLockedException}",
    "description": "Thrown when a method on a class inheriting [SimbaBase]{@link SimbaBase} is called that requires\na [Wallet]{@link Wallet} to be unlocked, and it isn't.",
    "lineNumber": 175,
    "interface": false,
    "extends": [
      "SigningException"
    ]
  },
  {
    "__docId__": 99,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~WalletLockedException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~WalletLockedException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 176,
    "undocument": true
  },
  {
    "__docId__": 100,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~WalletLockedException",
    "static": false,
    "longname": "src/exceptions.js~WalletLockedException#name",
    "access": "public",
    "description": null,
    "lineNumber": 178,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 101,
    "kind": "class",
    "name": "RetriesExceededException",
    "memberof": "src/exceptions.js",
    "static": true,
    "longname": "src/exceptions.js~RetriesExceededException",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/exceptions.js",
    "importStyle": "{RetriesExceededException}",
    "description": "Thrown when a method call exceeds the max retries",
    "lineNumber": 185,
    "interface": false,
    "extends": [
      "SigningException"
    ]
  },
  {
    "__docId__": 102,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/exceptions.js~RetriesExceededException",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/exceptions.js~RetriesExceededException#constructor",
    "access": "public",
    "description": null,
    "lineNumber": 186,
    "undocument": true
  },
  {
    "__docId__": 103,
    "kind": "member",
    "name": "name",
    "memberof": "src/exceptions.js~RetriesExceededException",
    "static": false,
    "longname": "src/exceptions.js~RetriesExceededException#name",
    "access": "public",
    "description": null,
    "lineNumber": 188,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 104,
    "kind": "file",
    "name": "src/index.js",
    "content": "import {SimbaBase, Simbachain} from './simba';\r\nimport {Wallet, LocalWallet, PKWallet} from './wallet';\r\nimport {NotImplementedException} from './exceptions';\r\n\r\n/**\r\n * Create an instance of a Simbachain API interaction class\r\n * Automatically takes care of choosing the correct implementation and running asynchronous initialisation.\r\n * @param {string} url - The API URL\r\n * @param {Wallet} wallet - The Wallet to use\r\n * @param {string} [apiKey] - (Optional) The API key\r\n * @param {string} [managementKey] - (Optional) The Management API key\r\n * @returns {Promise<Simbachain>} - An initialised instance of the API interaction class\r\n */\r\nconst getSimbaInstance = async (url, wallet, apiKey, managementKey) => {\r\n        if(url.startsWith('https://api.simbachain.com')){\r\n            //.com\r\n            let simba = new Simbachain(url, wallet);\r\n\r\n            if(apiKey){\r\n                simba.setApiKey(apiKey)\r\n            }\r\n\r\n            if(managementKey){\r\n                simba.setManagementKey(managementKey)\r\n            }\r\n\r\n            await simba.initialize();\r\n\r\n            return simba;\r\n        }else{\r\n            //scaas\r\n            throw new NotImplementedException(\"SCaaS Support not yet implemented, sorry.\")\r\n        }\r\n};\r\n\r\nexport {\r\n    SimbaBase,\r\n    Simbachain,\r\n    Wallet,\r\n    LocalWallet,\r\n    PKWallet,\r\n    getSimbaInstance\r\n}\r\n",
    "static": true,
    "longname": "C:/Users/keyz/Code/libsimba-js/src/index.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 105,
    "kind": "function",
    "name": "getSimbaInstance",
    "memberof": "src/index.js",
    "generator": false,
    "async": true,
    "static": true,
    "longname": "src/index.js~getSimbaInstance",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/index.js",
    "importStyle": "{getSimbaInstance}",
    "description": "Create an instance of a Simbachain API interaction class\nAutomatically takes care of choosing the correct implementation and running asynchronous initialisation.",
    "lineNumber": 14,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<Simbachain>} - An initialised instance of the API interaction class"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "The API URL"
      },
      {
        "nullable": null,
        "types": [
          "Wallet"
        ],
        "spread": false,
        "optional": false,
        "name": "wallet",
        "description": "The Wallet to use"
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": true,
        "name": "apiKey",
        "description": "(Optional) The API key"
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": true,
        "name": "managementKey",
        "description": "(Optional) The Management API key"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<Simbachain>"
      ],
      "spread": false,
      "description": "An initialised instance of the API interaction class"
    }
  },
  {
    "__docId__": 106,
    "kind": "file",
    "name": "src/simba/index.js",
    "content": "import SimbaBase from \"./simbabase\";\r\nimport Simbachain from \"./simba\";\r\n\r\nexport {\r\n    SimbaBase,\r\n    Simbachain\r\n}\r\n",
    "static": true,
    "longname": "C:/Users/keyz/Code/libsimba-js/src/simba/index.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 107,
    "kind": "file",
    "name": "src/simba/pagedresponse.js",
    "content": "/**\r\n * Wrapper for paged responses\r\n */\r\nexport default class PagedResponse {\r\n    /**\r\n     * Wrapper for paged responses\r\n     * @param {Object} data - The response\r\n     * @param {URL} url - The URL that provided the response\r\n     * @param {SimbaBase} simba - The SimbaBase instance that requested the response\r\n     */\r\n    constructor(data, url, simba){\r\n        this.url = new URL(url).toString();\r\n        this._count = data.count;\r\n        this._next_page = data.next;\r\n        this._previous_page = data.previous;\r\n        this.results = data.results;\r\n        this.simba = simba;\r\n    }\r\n\r\n    /**\r\n     * Grab the next page\r\n     * @returns {Promise<PagedResponse> | null} - Null if there's no next page\r\n     */\r\n    async next(){\r\n        if(!this._next_page) return null;\r\n        return this.simba.sendTransactionRequest(new URL(this._next_page).toString());\r\n    }\r\n\r\n    /**\r\n     * Grab the previous page\r\n     * @returns {Promise<PagedResponse> | null} - Null if there's no next page\r\n     */\r\n    async previous(){\r\n        if(!this._previous_page) return null;\r\n        return this.simba.sendTransactionRequest(new URL(this._previous_page).toString());\r\n    }\r\n\r\n    /**\r\n     * Returns the actual data\r\n     * @returns {Object}\r\n     */\r\n    data(){\r\n        return this.results;\r\n    }\r\n\r\n    /**\r\n     * Returns the result count\r\n     * @returns {number}\r\n     */\r\n    count(){\r\n        return this._count;\r\n    }\r\n\r\n    /**\r\n     * Returns the current page number\r\n     * @returns {number}\r\n     */\r\n    current_page(){\r\n        return this.url.searchParams.get('page');\r\n    }\r\n\r\n    /**\r\n     * Returns the next page number\r\n     * @returns {number}\r\n     */\r\n    next_page(){\r\n        return this._next_page;\r\n    }\r\n\r\n    /**\r\n     * Returns the previous page number\r\n     * @returns {number}\r\n     */\r\n    previous_page(){\r\n        return this._previous_page;\r\n    }\r\n}\r\n",
    "static": true,
    "longname": "C:/Users/keyz/Code/libsimba-js/src/simba/pagedresponse.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 108,
    "kind": "class",
    "name": "PagedResponse",
    "memberof": "src/simba/pagedresponse.js",
    "static": true,
    "longname": "src/simba/pagedresponse.js~PagedResponse",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/simba/pagedresponse.js",
    "importStyle": "PagedResponse",
    "description": "Wrapper for paged responses",
    "lineNumber": 4,
    "interface": false
  },
  {
    "__docId__": 109,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/simba/pagedresponse.js~PagedResponse",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/pagedresponse.js~PagedResponse#constructor",
    "access": "public",
    "description": "Wrapper for paged responses",
    "lineNumber": 11,
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "data",
        "description": "The response"
      },
      {
        "nullable": null,
        "types": [
          "URL"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "The URL that provided the response"
      },
      {
        "nullable": null,
        "types": [
          "SimbaBase"
        ],
        "spread": false,
        "optional": false,
        "name": "simba",
        "description": "The SimbaBase instance that requested the response"
      }
    ]
  },
  {
    "__docId__": 110,
    "kind": "member",
    "name": "url",
    "memberof": "src/simba/pagedresponse.js~PagedResponse",
    "static": false,
    "longname": "src/simba/pagedresponse.js~PagedResponse#url",
    "access": "public",
    "description": null,
    "lineNumber": 12,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 111,
    "kind": "member",
    "name": "_count",
    "memberof": "src/simba/pagedresponse.js~PagedResponse",
    "static": false,
    "longname": "src/simba/pagedresponse.js~PagedResponse#_count",
    "access": "private",
    "description": null,
    "lineNumber": 13,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 112,
    "kind": "member",
    "name": "_next_page",
    "memberof": "src/simba/pagedresponse.js~PagedResponse",
    "static": false,
    "longname": "src/simba/pagedresponse.js~PagedResponse#_next_page",
    "access": "private",
    "description": null,
    "lineNumber": 14,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 113,
    "kind": "member",
    "name": "_previous_page",
    "memberof": "src/simba/pagedresponse.js~PagedResponse",
    "static": false,
    "longname": "src/simba/pagedresponse.js~PagedResponse#_previous_page",
    "access": "private",
    "description": null,
    "lineNumber": 15,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 114,
    "kind": "member",
    "name": "results",
    "memberof": "src/simba/pagedresponse.js~PagedResponse",
    "static": false,
    "longname": "src/simba/pagedresponse.js~PagedResponse#results",
    "access": "public",
    "description": null,
    "lineNumber": 16,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 115,
    "kind": "member",
    "name": "simba",
    "memberof": "src/simba/pagedresponse.js~PagedResponse",
    "static": false,
    "longname": "src/simba/pagedresponse.js~PagedResponse#simba",
    "access": "public",
    "description": null,
    "lineNumber": 17,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 116,
    "kind": "method",
    "name": "next",
    "memberof": "src/simba/pagedresponse.js~PagedResponse",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/pagedresponse.js~PagedResponse#next",
    "access": "public",
    "description": "Grab the next page",
    "lineNumber": 24,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<PagedResponse> | null} - Null if there's no next page"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<PagedResponse> ",
        " null"
      ],
      "spread": false,
      "description": "Null if there's no next page"
    },
    "params": []
  },
  {
    "__docId__": 117,
    "kind": "method",
    "name": "previous",
    "memberof": "src/simba/pagedresponse.js~PagedResponse",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/pagedresponse.js~PagedResponse#previous",
    "access": "public",
    "description": "Grab the previous page",
    "lineNumber": 33,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<PagedResponse> | null} - Null if there's no next page"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<PagedResponse> ",
        " null"
      ],
      "spread": false,
      "description": "Null if there's no next page"
    },
    "params": []
  },
  {
    "__docId__": 118,
    "kind": "method",
    "name": "data",
    "memberof": "src/simba/pagedresponse.js~PagedResponse",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/pagedresponse.js~PagedResponse#data",
    "access": "public",
    "description": "Returns the actual data",
    "lineNumber": 42,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Object}"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": ""
    },
    "params": []
  },
  {
    "__docId__": 119,
    "kind": "method",
    "name": "count",
    "memberof": "src/simba/pagedresponse.js~PagedResponse",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/pagedresponse.js~PagedResponse#count",
    "access": "public",
    "description": "Returns the result count",
    "lineNumber": 50,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{number}"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "number"
      ],
      "spread": false,
      "description": ""
    },
    "params": []
  },
  {
    "__docId__": 120,
    "kind": "method",
    "name": "current_page",
    "memberof": "src/simba/pagedresponse.js~PagedResponse",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/pagedresponse.js~PagedResponse#current_page",
    "access": "public",
    "description": "Returns the current page number",
    "lineNumber": 58,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{number}"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "number"
      ],
      "spread": false,
      "description": ""
    },
    "params": []
  },
  {
    "__docId__": 121,
    "kind": "method",
    "name": "next_page",
    "memberof": "src/simba/pagedresponse.js~PagedResponse",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/pagedresponse.js~PagedResponse#next_page",
    "access": "public",
    "description": "Returns the next page number",
    "lineNumber": 66,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{number}"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "number"
      ],
      "spread": false,
      "description": ""
    },
    "params": []
  },
  {
    "__docId__": 122,
    "kind": "method",
    "name": "previous_page",
    "memberof": "src/simba/pagedresponse.js~PagedResponse",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/pagedresponse.js~PagedResponse#previous_page",
    "access": "public",
    "description": "Returns the previous page number",
    "lineNumber": 74,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{number}"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "number"
      ],
      "spread": false,
      "description": ""
    },
    "params": []
  },
  {
    "__docId__": 123,
    "kind": "file",
    "name": "src/simba/simba.js",
    "content": "import SimbaBase from './simbabase';\r\nimport {\r\n    WalletNotFoundException,\r\n    MissingMetadataException,\r\n    GenerateTransactionException,\r\n    SubmitTransactionException,\r\n    TransactionStatusCheckException,\r\n    NotImplementedException,\r\n    GetTransactionsException,\r\n    GetRequestException,\r\n    PostRequestException,\r\n    RetriesExceededException\r\n} from '../exceptions';\r\nimport PagedResponse from \"./pagedresponse\";\r\nvar FormData = require('form-data');\r\nimport axios from 'axios';\r\n\r\n/**\r\n * libsimba API Interaction for Simbachain.com\r\n */\r\nexport default class Simbachain extends SimbaBase {\r\n    /**\r\n     * libsimba API Interaction for Simbachain.com\r\n     * @param {string} endpoint - The endpoint of the API\r\n     * @param {Wallet} [wallet] - an optional {@link Wallet} instance\r\n     */\r\n    constructor(endpoint, wallet) {\r\n        super(endpoint, wallet);\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     * Perform asynchronous actions needed to initialise this class\r\n     */\r\n    async initialize() {\r\n        let response = await axios.request({\r\n            url: `${this.endpoint}?format=openapi`,\r\n            responseType: 'json'\r\n        });\r\n        let swagger = response.data;\r\n\r\n        if ('info' in swagger && 'x-simba-attrs' in swagger.info) {\r\n            this.metadata = swagger.info['x-simba-attrs'];\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Call a method on the API\r\n     * @param {string} method - the method to call\r\n     * @param {Object} parameters - the parameters for the method\r\n     * @return {Promise} - a promise resolving with the transaction details\r\n     */\r\n    async callMethod(method, parameters) {\r\n        if (!this.wallet) {\r\n            throw new WalletNotFoundException(\"No Wallet found\");\r\n        }\r\n\r\n        this.validateCall(method, parameters);\r\n\r\n        let formData = new FormData();\r\n        let address = await this.wallet.getAddress();\r\n        formData.append('from', address);\r\n        for (let [key, value] of Object.entries(parameters)) {\r\n            formData.append(key, value);\r\n        }\r\n\r\n        return this.sendMethodRequest(method, formData);\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Get the status of a transaction by ID\r\n     * @param {string} txnId - the transaction ID\r\n     * @return {Promise<Object>} - a promise resolving with the transaction details\r\n     */\r\n    getTransactionStatus(txnId) {\r\n        return axios.request({\r\n            url: `${this.endpoint}transaction/${txnId}/`,\r\n            method: 'GET',\r\n            headers: this.apiAuthHeaders(),\r\n            responseType: 'json'\r\n        })\r\n            .then(async (response) => {\r\n                return response.data;\r\n            })\r\n            .catch(error=>{\r\n                throw new TransactionStatusCheckException(error);\r\n            });\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * @private\r\n     * Gets the status of a transaction\r\n     * @param {Object} txn - a transaction object\r\n     * @return {Object} - an object with status details\r\n     */\r\n    checkTransactionStatusFromObject(txn) {\r\n        let ret = {\r\n            status: '',\r\n            transaction_hash: ''\r\n        };\r\n\r\n        if (txn.transaction_hash) {\r\n            ret.transaction_hash = txn.transaction_hash;\r\n        }\r\n\r\n        if (txn.error) {\r\n            ret.status = 'error';\r\n            ret.error = txn.error;\r\n            ret.error_details = txn.error_details;\r\n        } else if (!txn.receipt) {\r\n            ret.status = 'pending';\r\n        } else {\r\n            ret.status = 'success';\r\n        }\r\n\r\n        return ret;\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * @private\r\n     * Check if the transaction is complete\r\n     * @param {Object} txn - the transaction object\r\n     * @return {boolean} - is the transaction complete\r\n     */\r\n    checkTransactionDone(txn) {\r\n        return txn.status !== 'pending';\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * @private\r\n     * Gets the status of a transaction by ID\r\n     * @param {string} txnId - a transaction ID\r\n     * @return {Object} - an object with status details\r\n     */\r\n    checkTransactionStatus(txnId) {\r\n        return this.getTransactionStatus(txnId)\r\n            .then(this.checkTransactionStatusFromObject);\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Get the balance for the attached Wallet\r\n     * @return {Promise<Object>} - the balance\r\n     */\r\n    async getBalance() {\r\n        if (!this.metadata) {\r\n            throw new MissingMetadataException(\"App Metadata not yet retrieved\");\r\n        }\r\n\r\n        if (!this.wallet) {\r\n            throw new WalletNotFoundException(\"No Wallet found\");\r\n        }\r\n\r\n        if (this.metadata.poa) {\r\n            return Promise.resolve({\r\n                amount: -1,\r\n                currency: \"\",\r\n                poa: true\r\n            });\r\n        }\r\n\r\n        let address = await this.wallet.getAddress();\r\n        let response = await axios.request(\r\n            {\r\n                url: `${this.endpoint}balance/${address}/`,\r\n                method: 'GET',\r\n                headers: Object.assign({'Content-Type':'application/json'},this.apiAuthHeaders()),\r\n                responseType: 'json'\r\n            }\r\n        ).catch(error=>{\r\n                throw new GetRequestException(error);\r\n            });\r\n\r\n        return Promise.resolve({\r\n            ...response.data,\r\n            poa: false\r\n        });\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Add funds to the attached Wallet.\r\n     * Please check the output of this method. It is of the form\r\n     * ```\r\n     * {\r\n     *     txnId: null,\r\n     *     faucet_url: null,\r\n     *     poa: true\r\n     * }\r\n     * ```\r\n     *\r\n     * If successful, txnId will be populated.\r\n     * If the network is PoA, then poa will be true, and txnId will be null\r\n     * If the faucet for the network is external (e.g. Rinkeby, Ropsten, etc), then txnId will be null,\r\n     * and faucet_url will be populated with a URL. You should present this URL to your users to direct them\r\n     * to request funds there.\r\n     * @return {Promise<Object>} - details of the txn\r\n     */\r\n    async addFunds() {\r\n        if (!this.metadata) {\r\n            throw new MissingMetadataException(\"App Metadata not yet retrieved\");\r\n        }\r\n\r\n        if (!this.wallet) {\r\n            throw new WalletNotFoundException(\"No Wallet found\");\r\n        }\r\n\r\n        let address = await this.wallet.getAddress();\r\n\r\n        if (this.metadata.poa) {\r\n            return Promise.resolve({\r\n                txnId: null,\r\n                poa: true,\r\n                faucet_url: null\r\n            });\r\n        }\r\n\r\n        if (!this.metadata.simba_faucet) {\r\n            return Promise.resolve({\r\n                txnId: null,\r\n                poa: false,\r\n                faucet_url: this.metadata.faucet\r\n            });\r\n        }\r\n\r\n        let requestData = {\r\n            account: address,\r\n            value: \"1\",\r\n            currency: \"ether\"\r\n        };\r\n\r\n        let response = await axios.request(\r\n            {\r\n                url: `${this.endpoint}balance/${address}/`,\r\n                method: 'POST',\r\n                headers: Object.assign({'Content-Type':'application/json'}, this.apiAuthHeaders()),\r\n                data: requestData,\r\n                responseType: 'json'\r\n            }\r\n        ).catch(error=>{\r\n            throw new PostRequestException(error);\r\n        });\r\n\r\n\r\n        return Promise.resolve({\r\n            ...response.data,\r\n            poa: false,\r\n            faucet_url: null\r\n        });\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Call a method on the API with files\r\n     * @param {string} method - the method to call\r\n     * @param {Object} parameters- the parameters for the method\r\n     * @param {Array<Blob|File>} files - the files\r\n     * @return {Promise<Object>} - a promise resolving with the transaction details\r\n     */\r\n    async callMethodWithFile(method, parameters, files) {\r\n        if (!this.wallet) {\r\n            throw new WalletNotFoundException(\"No Wallet found\");\r\n        }\r\n\r\n        this.validateCall(method, parameters, files);\r\n\r\n        let formData = new FormData();\r\n        let address = await this.wallet.getAddress();\r\n        formData.append('from', address);\r\n        for (let [key, value] of Object.entries(parameters)) {\r\n            formData.append(key, value);\r\n        }\r\n\r\n        for(let i = 0; i < files.length; i++){\r\n            formData.append('data', files[i], { filename: `files[${i}]`});\r\n        }\r\n\r\n        return this.sendMethodRequest(method, formData);\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     * Internal method for submitting method calls and retrying on nonce errors\r\n     * @param {string} txnId - the txnId\r\n     * @param {string} signed - The signed txn\r\n     * @returns {Promise<Response>} - The response with transaction data\r\n     */\r\n    async submitTxn(txnId, payload, maxTries, currentTry){\r\n        if(!maxTries) maxTries = 5;\r\n        if(!currentTry) currentTry = 0;\r\n        if(currentTry > maxTries){\r\n            throw new RetriesExceededException();\r\n        }\r\n        // tslint:disable-next-line: no-unsafe-any\r\n        const signed = await this.wallet.sign(payload);\r\n\r\n        return axios.request({\r\n            url: `${this.endpoint}transaction/${txnId}/`,\r\n            method: 'POST',\r\n            headers: Object.assign({'Content-Type':'application/json'},this.apiAuthHeaders()),\r\n            data: {payload: signed},\r\n            responseType: 'json'\r\n        }).then(response => {\r\n            // tslint:disable-next-line: no-console\r\n            console.log('Success!', response.data);\r\n            return txnId;\r\n        }).catch(ex=>{\r\n            let body = ex.response.data;\r\n            if(body.errors && body.errors.length){\r\n                let error = body.errors[0];\r\n                if(error.detail && error.detail.code){\r\n                    let code = error.detail.code;\r\n                    //Nonce Error\r\n                    if(code === \"15001\" && error.detail.meta && error.detail.meta.suggested_nonce){\r\n                        console.log(\"Nonce Too Low, trying again with suggested nonce \" + error.detail.meta.suggested_nonce);\r\n                        payload.nonce = error.detail.meta.suggested_nonce;\r\n                        return this.submitTxn(txnId, payload, maxTries, currentTry++);\r\n                    }\r\n                }\r\n            }\r\n            throw new SubmitTransactionException(JSON.stringify(body), ex);\r\n        });\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     * Internal method for sending method calls\r\n     * @param {string} url - the url\r\n     * @param {object} formdata - Formdata for the POST\r\n     * @returns {Promise<Response>} - The response with transaction data\r\n     */\r\n    async sendMethodRequest(method, formdata){\r\n        let txnId = null;\r\n        let payload;\r\n\r\n        let headers = {};\r\n\r\n        headers = Object.assign(headers,this.apiAuthHeaders());\r\n\r\n        if(formdata.getHeaders){\r\n            //For NodeJS\r\n            headers = Object.assign(headers,formdata.getHeaders());\r\n        }\r\n\r\n        return axios.request({\r\n            url: `${this.endpoint}${method}/`,\r\n            method: 'POST',\r\n            headers: headers,\r\n            data: formdata,\r\n            responseType: 'json'\r\n        })\r\n            .then((response) => {\r\n                // tslint:disable-next-line: no-unsafe-any\r\n                txnId = response.data.id;\r\n                // tslint:disable-next-line: no-unsafe-any\r\n\r\n                payload = response.data.payload.raw;\r\n\r\n                return this.submitTxn(txnId, payload);\r\n            })\r\n            .catch(ex=>{\r\n                throw new GenerateTransactionException(ex);\r\n            });\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Gets a specific transaction\r\n     * @param {string} transactionIdOrHash - Either a transaction ID or a transaction hash\r\n     * @returns {Promise<Object>} - The transaction\r\n     */\r\n    async getTransaction(transactionIdOrHash) {\r\n        this.validateAnyGetCall();\r\n\r\n        let url = new URL(`${this.endpoint}transaction/${transactionIdOrHash}/`);\r\n\r\n        let response = await axios.request({\r\n            url: url.toString(),\r\n            method: 'GET',\r\n            headers: this.apiAuthHeaders(),\r\n            responseType: 'json'\r\n        })\r\n            .catch(ex=>{\r\n                throw new GetTransactionsException(ex);\r\n            });\r\n\r\n        return response.data;\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Gets a paged list of transactions\r\n     * @param {Object} parameters - The query parameters\r\n     * @returns {Promise<PagedResponse>} - A response wrapped in a {@link PagedResponse} helper\r\n     */\r\n    async getTransactions(parameters) {\r\n        this.validateAnyGetCall();\r\n\r\n        let url = new URL(`${this.endpoint}transaction/`);\r\n\r\n        for (let [key, value] of Object.entries(parameters)) {\r\n            url.searchParams.set(key, value);\r\n        }\r\n\r\n        return this.sendTransactionRequest(url.toString());\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Gets a paged list of transactions for the method\r\n     * @param {string} method - The method\r\n     * @param {Object} parameters - The query parameters\r\n     * @returns {Promise<PagedResponse>} - A response wrapped in a {@link PagedResponse} helper\r\n     */\r\n    async getMethodTransactions(method, parameters) {\r\n        this.validateGetCall(method, parameters);\r\n\r\n        let url = new URL(`${this.endpoint}${method}/`);\r\n\r\n        for (let [key, value] of Object.entries(parameters)) {\r\n            url.searchParams.set(key, value);\r\n        }\r\n\r\n        return this.sendTransactionRequest(url.toString());\r\n    }\r\n\r\n    /**\r\n     * @protected\r\n     * @override\r\n     * Internal function for sending transaction GET requests\r\n     * @param {URL} url - The URL\r\n     * @returns {Promise<PagedResponse>} - A response wrapped in a {@link PagedResponse} helper\r\n     */\r\n    async sendTransactionRequest(url){\r\n        let response = await axios.request({\r\n            url: url.toString(),\r\n            method: 'GET',\r\n            headers: this.apiAuthHeaders(),\r\n            responseType: 'json'\r\n        })\r\n            .catch(ex=>{\r\n                throw new GetTransactionsException(ex);\r\n            });\r\n\r\n        return new PagedResponse(response.data, url, this);\r\n    }\r\n\r\n\r\n    /**\r\n     * @override\r\n     * Gets a the bundle metadata for a transaction\r\n     * @param {string} transactionIdOrHash - Either a transaction ID or a transaction hash\r\n     * @returns {Promise<Object>} - The bundle metadata\r\n     */\r\n    async getBundleMetadataForTransaction(transactionIdOrHash) {\r\n        let url = new URL(`${this.endpoint}transaction/${transactionIdOrHash}/bundle/`);\r\n\r\n        url.searchParams.append('no_files', true);\r\n\r\n        let response = await axios.request({\r\n            url: url.toString(),\r\n            method: 'GET',\r\n            headers: this.apiAuthHeaders(),\r\n            json: true\r\n        })\r\n            .catch(ex=>{\r\n                throw new GetRequestException(ex);\r\n            });\r\n\r\n        return response.data;\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Gets the bundle for a transaction\r\n     * @param {string} transactionIdOrHash - Either a transaction ID or a transaction hash\r\n     * @returns {Promise<ReadableStream|Blob>} - The bundle\r\n     */\r\n    async getBundleForTransaction(transactionIdOrHash) {\r\n        let url = new URL(`${this.endpoint}transaction/${transactionIdOrHash}/bundle_raw/`);\r\n\r\n        let responseType = 'arraybuffer';\r\n        if (typeof window !== 'undefined'){\r\n            //in a browser\r\n            responseType = 'blob';\r\n        }\r\n\r\n        let response = await axios.request({\r\n            url: url.toString(),\r\n            method: 'GET',\r\n            headers: this.apiAuthHeaders(),\r\n            responseType: responseType\r\n        })\r\n            .catch(ex=>{\r\n                throw new GetRequestException(ex);\r\n            });\r\n\r\n        return response.data;\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Gets a file from the bundle for a transaction\r\n     * @param {string} transactionIdOrHash - Either a transaction ID or a transaction hash\r\n     * @param {number} fileIdx - The index of the file in the bundle metadata\r\n     * @param {boolean} stream - If true, returns a {@link ReadableStream}, otherwise returns a {@link Blob}\r\n     * @returns {Promise<ReadableStream|Blob>} - The file\r\n     */\r\n    async getFileFromBundleForTransaction(transactionIdOrHash, fileIdx, stream) {\r\n        let url = new URL(`${this.endpoint}transaction/${transactionIdOrHash}/file/${fileIdx}/`);\r\n\r\n        let responseType = 'arraybuffer';\r\n        if (typeof window !== 'undefined'){\r\n            //in a browser\r\n            responseType = 'blob';\r\n        }\r\n        if(stream){\r\n            responseType = 'stream';\r\n        }\r\n\r\n        let response = await axios.request({\r\n            url: url.toString(),\r\n            method: 'GET',\r\n            headers: this.apiAuthHeaders(),\r\n            responseType: responseType\r\n        })\r\n            .catch(ex=>{\r\n                throw new GetRequestException(ex);\r\n            });\r\n\r\n        console.log(response);\r\n        return response.data;\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Gets a file from the bundle for a transaction\r\n     * @param {string} transactionIdOrHash - Either a transaction ID or a transaction hash\r\n     * @param {string} fileName - The name of the file in the bundle metadata\r\n     * @param {boolean} stream - If true, returns a {@link ReadableStream}, otherwise returns a {@link Blob}\r\n     * @returns {Promise<ReadableStream|Blob>} - The file\r\n     */\r\n    async getFileFromBundleByNameForTransaction(transactionIdOrHash, fileName, stream) {\r\n        let url = new URL(`${this.endpoint}transaction/${transactionIdOrHash}/fileByName/${fileName}/`);\r\n\r\n        let responseType = 'arraybuffer';\r\n        if (typeof window !== 'undefined'){\r\n            //in a browser\r\n            responseType = 'blob';\r\n        }\r\n        if(stream){\r\n            responseType = 'stream';\r\n        }\r\n\r\n        let response = await axios.request({\r\n            url: url.toString(),\r\n            method: 'GET',\r\n            headers: this.apiAuthHeaders(),\r\n            responseType: responseType\r\n        })\r\n            .catch(ex=>{\r\n                throw new GetRequestException(ex);\r\n            });\r\n\r\n        console.log(response);\r\n        return response.data;\r\n    }\r\n}\r\n",
    "static": true,
    "longname": "C:/Users/keyz/Code/libsimba-js/src/simba/simba.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 124,
    "kind": "variable",
    "name": "FormData",
    "memberof": "src/simba/simba.js",
    "static": true,
    "longname": "src/simba/simba.js~FormData",
    "access": "public",
    "export": false,
    "importPath": "@simbachain/libsimba-js/src/simba/simba.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 15,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    },
    "ignore": true
  },
  {
    "__docId__": 125,
    "kind": "class",
    "name": "Simbachain",
    "memberof": "src/simba/simba.js",
    "static": true,
    "longname": "src/simba/simba.js~Simbachain",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/simba/simba.js",
    "importStyle": "Simbachain",
    "description": "libsimba API Interaction for Simbachain.com",
    "lineNumber": 21,
    "interface": false,
    "extends": [
      "src/simba/simbabase.js~SimbaBase"
    ]
  },
  {
    "__docId__": 126,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#constructor",
    "access": "public",
    "description": "libsimba API Interaction for Simbachain.com",
    "lineNumber": 27,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "endpoint",
        "description": "The endpoint of the API"
      },
      {
        "nullable": null,
        "types": [
          "Wallet"
        ],
        "spread": false,
        "optional": true,
        "name": "wallet",
        "description": "an optional {@link Wallet} instance"
      }
    ]
  },
  {
    "__docId__": 127,
    "kind": "method",
    "name": "initialize",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#initialize",
    "access": "private",
    "description": "",
    "lineNumber": 35,
    "params": [],
    "return": null
  },
  {
    "__docId__": 128,
    "kind": "member",
    "name": "metadata",
    "memberof": "src/simba/simba.js~Simbachain",
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#metadata",
    "access": "public",
    "description": null,
    "lineNumber": 43,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 129,
    "kind": "method",
    "name": "callMethod",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#callMethod",
    "access": "public",
    "description": "",
    "lineNumber": 54,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "method",
        "description": "the method to call"
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "parameters",
        "description": "the parameters for the method"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "a promise resolving with the transaction details"
    },
    "override": true
  },
  {
    "__docId__": 130,
    "kind": "method",
    "name": "getTransactionStatus",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#getTransactionStatus",
    "access": "public",
    "description": "",
    "lineNumber": 77,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "txnId",
        "description": "the transaction ID"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<Object>"
      ],
      "spread": false,
      "description": "a promise resolving with the transaction details"
    },
    "override": true
  },
  {
    "__docId__": 131,
    "kind": "method",
    "name": "checkTransactionStatusFromObject",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#checkTransactionStatusFromObject",
    "access": "private",
    "description": "",
    "lineNumber": 99,
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "txn",
        "description": "a transaction object"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": "an object with status details"
    },
    "override": true
  },
  {
    "__docId__": 132,
    "kind": "method",
    "name": "checkTransactionDone",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#checkTransactionDone",
    "access": "private",
    "description": "",
    "lineNumber": 129,
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "txn",
        "description": "the transaction object"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "boolean"
      ],
      "spread": false,
      "description": "is the transaction complete"
    },
    "override": true
  },
  {
    "__docId__": 133,
    "kind": "method",
    "name": "checkTransactionStatus",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#checkTransactionStatus",
    "access": "private",
    "description": "",
    "lineNumber": 140,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "txnId",
        "description": "a transaction ID"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": "an object with status details"
    },
    "override": true
  },
  {
    "__docId__": 134,
    "kind": "method",
    "name": "getBalance",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#getBalance",
    "access": "public",
    "description": "",
    "lineNumber": 150,
    "return": {
      "nullable": null,
      "types": [
        "Promise<Object>"
      ],
      "spread": false,
      "description": "the balance"
    },
    "override": true,
    "params": []
  },
  {
    "__docId__": 135,
    "kind": "method",
    "name": "addFunds",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#addFunds",
    "access": "public",
    "description": "",
    "lineNumber": 204,
    "return": {
      "nullable": null,
      "types": [
        "Promise<Object>"
      ],
      "spread": false,
      "description": "details of the txn"
    },
    "override": true,
    "params": []
  },
  {
    "__docId__": 136,
    "kind": "method",
    "name": "callMethodWithFile",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#callMethodWithFile",
    "access": "public",
    "description": "",
    "lineNumber": 265,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "method",
        "description": "the method to call"
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "parameters-",
        "description": "the parameters for the method"
      },
      {
        "nullable": null,
        "types": [
          "Array<Blob|File>"
        ],
        "spread": false,
        "optional": false,
        "name": "files",
        "description": "the files"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<Object>"
      ],
      "spread": false,
      "description": "a promise resolving with the transaction details"
    },
    "override": true
  },
  {
    "__docId__": 137,
    "kind": "method",
    "name": "submitTxn",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#submitTxn",
    "access": "private",
    "description": "",
    "lineNumber": 293,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<Response>} - The response with transaction data"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "txnId",
        "description": "the txnId"
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "signed",
        "description": "The signed txn"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<Response>"
      ],
      "spread": false,
      "description": "The response with transaction data"
    }
  },
  {
    "__docId__": 138,
    "kind": "method",
    "name": "sendMethodRequest",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#sendMethodRequest",
    "access": "private",
    "description": "",
    "lineNumber": 337,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<Response>} - The response with transaction data"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "the url"
      },
      {
        "nullable": null,
        "types": [
          "object"
        ],
        "spread": false,
        "optional": false,
        "name": "formdata",
        "description": "Formdata for the POST"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<Response>"
      ],
      "spread": false,
      "description": "The response with transaction data"
    }
  },
  {
    "__docId__": 139,
    "kind": "method",
    "name": "getTransaction",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#getTransaction",
    "access": "public",
    "description": "",
    "lineNumber": 377,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<Object>} - The transaction"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "transactionIdOrHash",
        "description": "Either a transaction ID or a transaction hash"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<Object>"
      ],
      "spread": false,
      "description": "The transaction"
    },
    "override": true
  },
  {
    "__docId__": 140,
    "kind": "method",
    "name": "getTransactions",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#getTransactions",
    "access": "public",
    "description": "",
    "lineNumber": 401,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<PagedResponse>} - A response wrapped in a {@link PagedResponse} helper"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "parameters",
        "description": "The query parameters"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<PagedResponse>"
      ],
      "spread": false,
      "description": "A response wrapped in a {@link PagedResponse} helper"
    },
    "override": true
  },
  {
    "__docId__": 141,
    "kind": "method",
    "name": "getMethodTransactions",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#getMethodTransactions",
    "access": "public",
    "description": "",
    "lineNumber": 420,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<PagedResponse>} - A response wrapped in a {@link PagedResponse} helper"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "method",
        "description": "The method"
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "parameters",
        "description": "The query parameters"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<PagedResponse>"
      ],
      "spread": false,
      "description": "A response wrapped in a {@link PagedResponse} helper"
    },
    "override": true
  },
  {
    "__docId__": 142,
    "kind": "method",
    "name": "sendTransactionRequest",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#sendTransactionRequest",
    "access": "protected",
    "description": "",
    "lineNumber": 439,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<PagedResponse>} - A response wrapped in a {@link PagedResponse} helper"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "URL"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "The URL"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<PagedResponse>"
      ],
      "spread": false,
      "description": "A response wrapped in a {@link PagedResponse} helper"
    },
    "override": true
  },
  {
    "__docId__": 143,
    "kind": "method",
    "name": "getBundleMetadataForTransaction",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#getBundleMetadataForTransaction",
    "access": "public",
    "description": "",
    "lineNumber": 460,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<Object>} - The bundle metadata"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "transactionIdOrHash",
        "description": "Either a transaction ID or a transaction hash"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<Object>"
      ],
      "spread": false,
      "description": "The bundle metadata"
    },
    "override": true
  },
  {
    "__docId__": 144,
    "kind": "method",
    "name": "getBundleForTransaction",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#getBundleForTransaction",
    "access": "public",
    "description": "",
    "lineNumber": 484,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<ReadableStream|Blob>} - The bundle"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "transactionIdOrHash",
        "description": "Either a transaction ID or a transaction hash"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<ReadableStream|Blob>"
      ],
      "spread": false,
      "description": "The bundle"
    },
    "override": true
  },
  {
    "__docId__": 145,
    "kind": "method",
    "name": "getFileFromBundleForTransaction",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#getFileFromBundleForTransaction",
    "access": "public",
    "description": "",
    "lineNumber": 514,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<ReadableStream|Blob>} - The file"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "transactionIdOrHash",
        "description": "Either a transaction ID or a transaction hash"
      },
      {
        "nullable": null,
        "types": [
          "number"
        ],
        "spread": false,
        "optional": false,
        "name": "fileIdx",
        "description": "The index of the file in the bundle metadata"
      },
      {
        "nullable": null,
        "types": [
          "boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "stream",
        "description": "If true, returns a {@link ReadableStream}, otherwise returns a {@link Blob}"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<ReadableStream|Blob>"
      ],
      "spread": false,
      "description": "The file"
    },
    "override": true
  },
  {
    "__docId__": 146,
    "kind": "method",
    "name": "getFileFromBundleByNameForTransaction",
    "memberof": "src/simba/simba.js~Simbachain",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simba.js~Simbachain#getFileFromBundleByNameForTransaction",
    "access": "public",
    "description": "",
    "lineNumber": 548,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<ReadableStream|Blob>} - The file"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "transactionIdOrHash",
        "description": "Either a transaction ID or a transaction hash"
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "fileName",
        "description": "The name of the file in the bundle metadata"
      },
      {
        "nullable": null,
        "types": [
          "boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "stream",
        "description": "If true, returns a {@link ReadableStream}, otherwise returns a {@link Blob}"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<ReadableStream|Blob>"
      ],
      "spread": false,
      "description": "The file"
    },
    "override": true
  },
  {
    "__docId__": 147,
    "kind": "file",
    "name": "src/simba/simbabase.js",
    "content": "import {pollWrapper} from \"poll-js\";\r\nimport {\r\n    MissingMetadataException,\r\n    NotImplementedException,\r\n    BadMetadataException,\r\n    MethodCallValidationMetadataException,\r\n    GetTransactionsException\r\n} from '../exceptions';\r\nimport PagedResponse from \"./pagedresponse\";\r\n\r\n/**\r\n * @interface\r\n * Base class for libsimba API Interaction implementations\r\n */\r\nexport default class SimbaBase {\r\n    /**\r\n     * Base class for libsimba API Interaction implementations\r\n     * @param {string} endpoint - The endpoint of the API\r\n     * @param {Wallet} [wallet] - an optional {@link Wallet} instance\r\n     */\r\n    constructor(endpoint, wallet) {\r\n        if (!endpoint.endsWith('/')) {\r\n            this.endpoint = `${endpoint}/`;\r\n        } else {\r\n            this.endpoint = endpoint;\r\n        }\r\n        this.wallet = wallet;\r\n\r\n        this.metadata = {};\r\n\r\n        if (this.constructor === SimbaBase) {\r\n            // Error Type 1. Abstract class can not be constructed.\r\n            throw new TypeError('Can not construct abstract class.');\r\n        }\r\n\r\n        if (this.initialize === SimbaBase.prototype.initialize) {\r\n            throw new NotImplementedException('Please implement abstract method callMethod.');\r\n        }\r\n\r\n        if (this.callMethod === SimbaBase.prototype.callMethod) {\r\n            throw new NotImplementedException('Please implement abstract method callMethod.');\r\n        }\r\n\r\n        if (this.getTransactionStatus === SimbaBase.prototype.getTransactionStatus) {\r\n            throw new NotImplementedException('Please implement abstract method getTransactionStatus.');\r\n        }\r\n\r\n        if (this.checkTransactionStatusFromObject === SimbaBase.prototype.checkTransactionStatusFromObject) {\r\n            throw new NotImplementedException('Please implement abstract method checkTransactionStatusFromObject.');\r\n        }\r\n\r\n        if (this.checkTransactionDone === SimbaBase.prototype.checkTransactionDone) {\r\n            throw new NotImplementedException('Please implement abstract method checkTransactionDone.');\r\n        }\r\n\r\n        if (this.checkTransactionStatus === SimbaBase.prototype.checkTransactionStatus) {\r\n            throw new NotImplementedException('Please implement abstract method checkTransactionStatus.');\r\n        }\r\n\r\n        if (this.getBalance === SimbaBase.prototype.getBalance) {\r\n            throw new NotImplementedException('Please implement abstract method getBalance.');\r\n        }\r\n\r\n        if (this.addFunds === SimbaBase.prototype.addFunds) {\r\n            throw new NotImplementedException('Please implement abstract method addFunds.');\r\n        }\r\n\r\n        if (this.getMethodTransactions === SimbaBase.prototype.getMethodTransactions) {\r\n            throw new NotImplementedException('Please implement abstract method getMethodTransactions.');\r\n        }\r\n\r\n        if (this.getTransaction === SimbaBase.prototype.getTransaction) {\r\n            throw new NotImplementedException('Please implement abstract method getTransaction.');\r\n        }\r\n\r\n        if (this.getTransactions === SimbaBase.prototype.getTransactions) {\r\n            throw new NotImplementedException('Please implement abstract method getTransactions.');\r\n        }\r\n\r\n        if (this.getBundleMetadataForTransaction === SimbaBase.prototype.getBundleMetadataForTransaction) {\r\n            throw new NotImplementedException('Please implement abstract method getBundleMetadataForTransaction.');\r\n        }\r\n\r\n        if (this.getBundleForTransaction === SimbaBase.prototype.getBundleForTransaction) {\r\n            throw new NotImplementedException('Please implement abstract method getBundleForTransaction.');\r\n        }\r\n\r\n        if (this.getFileFromBundleForTransaction === SimbaBase.prototype.getFileFromBundleForTransaction) {\r\n            throw new NotImplementedException('Please implement abstract method getFileFromBundleForTransaction.');\r\n        }\r\n\r\n        if (this.getFileFromBundleByNameForTransaction === SimbaBase.prototype.getFileFromBundleByNameForTransaction) {\r\n            throw new NotImplementedException('Please implement abstract method getFileFromBundleByNameForTransaction.');\r\n        }\r\n\r\n        if (this.sendTransactionRequest === SimbaBase.prototype.sendTransactionRequest) {\r\n            throw new NotImplementedException('Please implement abstract method sendTransactionRequest.');\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Perform any asynchronous actions needed to initialise this class\r\n     */\r\n    initialize() {\r\n        throw new NotImplementedException('SimbaBase.initialize Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Call a method on the API\r\n     * @param {string} method - the method to call\r\n     * @param {Object} parameters - the parameters for the method\r\n     * @return {Promise} - a promise resolving with the transaction details\r\n     */\r\n    callMethod(method, parameters) {\r\n        throw new NotImplementedException('SimbaBase.callMethod Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Gets a paged list of transactions for the method\r\n     * @param {string} method - The method\r\n     * @param {Object} parameters - The query parameters\r\n     */\r\n    getMethodTransactions(method, parameters) {\r\n        throw new NotImplementedException('SimbaBase.callMethod Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Gets a specific transaction\r\n     * @param {string} transactionIdOrHash - Either a transaction ID or a transaction hash\r\n     * @returns {Promise<Object>} - The transaction\r\n     */\r\n    getTransaction(transactionIdOrHash) {\r\n        throw new NotImplementedException('SimbaBase.getTransaction Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Gets a the bundle metadata for a transaction\r\n     * @param {string} transactionIdOrHash - Either a transaction ID or a transaction hash\r\n     * @returns {Promise<Object>} - The bundle metadata\r\n     */\r\n    getBundleMetadataForTransaction(transactionIdOrHash) {\r\n        throw new NotImplementedException('SimbaBase.getTransaction Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Gets the bundle for a transaction\r\n     * @param {string} transactionIdOrHash - Either a transaction ID or a transaction hash\r\n     * @param {boolean} stream - If true, returns a {@link ReadableStream}, otherwise returns a {@link Blob}\r\n     * @returns {Promise<ReadableStream|Blob>} - The bundle\r\n     */\r\n    getBundleForTransaction(transactionIdOrHash, stream) {\r\n        throw new NotImplementedException('SimbaBase.getTransaction Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Gets a file from the bundle for a transaction\r\n     * @param {string} transactionIdOrHash - Either a transaction ID or a transaction hash\r\n     * @param {number} fileIdx - The index of the file in the bundle metadata\r\n     * @param {boolean} stream - If true, returns a {@link ReadableStream}, otherwise returns a {@link Blob}\r\n     * @returns {Promise<ReadableStream|Blob>} - The file\r\n     */\r\n    getFileFromBundleForTransaction(transactionIdOrHash, fileIdx, stream) {\r\n        throw new NotImplementedException('SimbaBase.getTransaction Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Gets a file from the bundle for a transaction\r\n     * @param {string} transactionIdOrHash - Either a transaction ID or a transaction hash\r\n     * @param {string} fileName - The name of the file in the bundle metadata\r\n     * @param {boolean} stream - If true, returns a {@link ReadableStream}, otherwise returns a {@link Blob}\r\n     * @returns {Promise<ReadableStream|Blob>} - The file\r\n     */\r\n    getFileFromBundleByNameForTransaction(transactionIdOrHash, fileName, stream) {\r\n        throw new NotImplementedException('SimbaBase.getTransaction Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Gets a paged list of transactions\r\n     * @param {Object} parameters - The query parameters\r\n     * @returns {Promise<PagedResponse>} - A response wrapped in a {@link PagedResponse} helper\r\n     */\r\n    getTransactions(parameters) {\r\n        throw new NotImplementedException('SimbaBase.callMethod Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * Internal function for sending transaction GET requests\r\n     * @param {URL} url - The URL\r\n     * @returns {Promise<PagedResponse>} - A response wrapped in a {@link PagedResponse} helper\r\n     */\r\n    async sendTransactionRequest(url){\r\n        throw new NotImplementedException('SimbaBase.sendTransactionRequest Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Call a method on the API with files\r\n     * @param {string} method - the method to call\r\n     * @param {Object} parameters - the parameters for the method\r\n     * @param {Array<Blob|File>} files - the files\r\n     * @return {Promise<Object>} - a promise resolving with the transaction details\r\n     */\r\n    callMethodWithFile(method, parameters, files) {\r\n        throw new NotImplementedException('SimbaBase.callMethod Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Get the status of a transaction by ID\r\n     * @param {string} txnId - the transaction ID\r\n     * @return {Promise<Object>} - a promise resolving with the transaction details\r\n     */\r\n    getTransactionStatus(txnId){\r\n        throw new NotImplementedException('SimbaBase.getTransactionStatus Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * @private\r\n     * (Abstract) Gets the status of a transaction\r\n     * @param {Object} txn - a transaction object\r\n     * @return {Object} - an object with status details\r\n     */\r\n    checkTransactionStatusFromObject(txn){\r\n        throw new NotImplementedException('SimbaBase.checkTransactionStatusFromObject Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * @private\r\n     * (Abstract) Check if the transaction is complete\r\n     * @param {Object} txn - the transaction object\r\n     * @return {boolean} - is the transaction complete\r\n     */\r\n    checkTransactionDone(txn){\r\n        throw new NotImplementedException('SimbaBase.checkTransactionDone Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Gets the status of a transaction by ID\r\n     * @param {string} txnId - a transaction ID\r\n     * @return {Object} - an object with status details\r\n     */\r\n    checkTransactionStatus(txnId){\r\n        throw new NotImplementedException('SimbaBase.checkTransactionStatus Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Get the balance for the attached Wallet\r\n     * @return {Promise<Object>} - the balance\r\n     */\r\n    getBalance(){\r\n        throw new NotImplementedException('SimbaBase.getBalance Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Add funds to the attached Wallet.\r\n     * Please check the output of this method. It is of the form\r\n     * ```\r\n     * {\r\n     *     txnId: null,\r\n     *     faucet_url: null,\r\n     *     poa: true\r\n     * }\r\n     * ```\r\n     *\r\n     * If successful, txnId will be populated.\r\n     * If the network is PoA, then poa will be true, and txnId will be null\r\n     * If the faucet for the network is external (e.g. Rinkeby, Ropsten, etc), then txnId will be null,\r\n     * and faucet_url will be populated with a URL. You should present this URL to your users to direct them\r\n     * to request funds there.\r\n     * @return {Promise<Object>} - details of the txn\r\n     */\r\n    addFunds(){\r\n        throw new NotImplementedException('SimbaBase.addFunds Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * Returns an object with 'future' and 'cancel' keys.\r\n     * future is the promise to listen on for the response or an error.\r\n     * cancel is a function - call it to cancel the polling.\r\n     * @param {string} txnId - the transaction ID\r\n     * @param {number} [pollInterval=5000] - the interval in ms for polling\r\n     */\r\n    waitForSuccessOrError(txnId, pollInterval){\r\n        if(!pollInterval) pollInterval = 5000;\r\n\r\n        return pollWrapper({\r\n            request: () => this.getTransactionStatus(txnId),\r\n            pollingPeriod: pollInterval, // ms\r\n            shouldStop: (txn)=> this.checkTransactionDone(this.checkTransactionStatusFromObject(txn))\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Set the wallet\r\n     * @param {Wallet} wallet - the wallet\r\n     */\r\n    setWallet(wallet){\r\n        this.wallet = wallet;\r\n    }\r\n\r\n    /**\r\n     * Set the API Key to authenticate calls\r\n     * @param {string} apiKey - the API Key\r\n     */\r\n    setApiKey(apiKey){\r\n        this.apiKey = apiKey;\r\n    }\r\n\r\n    /**\r\n     * Set the API Key to authenticate management calls\r\n     * @param {string} managementKey - the management API Key\r\n     */\r\n    setManagementKey(managementKey){\r\n        this.managementKey = managementKey;\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     * Get API Call auth headers\r\n     * @returns {{APIKEY: *, \"Content-Type\": string}}\r\n     */\r\n    apiAuthHeaders() {\r\n        return {\r\n            APIKEY: this.apiKey,\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     * Get management API Call auth headers\r\n     * @returns {{APIKEY: *, \"Content-Type\": string}}\r\n     */\r\n    managementAuthHeaders() {\r\n        return {\r\n            APIKEY: this.managementKey,\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     * Validate the method call against the app metadata\r\n     * @param {string} methodName - the methods name\r\n     * @param {Object} parameters - the parameters for the method call\r\n     * @param {Array} [files] - Optional array of files\r\n     * @returns {boolean}\r\n     * @throws {MissingMetadataException} - App Metadata not yet retrieved\r\n     * @throws {BadMetadataException} - App Metadata doesn't have methods\r\n     * @throws {MethodCallValidationMetadataException} - Method call fails validation\r\n     */\r\n    validateCall(methodName, parameters, files){\r\n        if (!this.metadata) {\r\n            throw new MissingMetadataException(\"App Metadata not yet retrieved\");\r\n        }\r\n\r\n        if (!this.metadata.methods) {\r\n            throw new BadMetadataException(\"App Metadata doesn't have methods!\");\r\n        }\r\n\r\n        if(!(methodName in this.metadata.methods)){\r\n            throw new MethodCallValidationMetadataException(`Method \"${methodName}\" not found`);\r\n        }\r\n\r\n        let methodMeta = this.metadata.methods[methodName];\r\n\r\n        if(files && !('_files' in methodMeta.parameters)){\r\n            throw new MethodCallValidationMetadataException(`Method \"${methodName}\" does not accept files`);\r\n        }\r\n\r\n        if(parameters['_files']){\r\n            throw new MethodCallValidationMetadataException(`Files must not be passed in through the parameters argument`);\r\n        }\r\n\r\n        if(files){\r\n            for(let i = 0; i < files.length; i++){\r\n                if(typeof window !== 'undefined' && typeof window.document !== 'undefined'){\r\n                    if(!(files[i] instanceof Blob) && !(files[i] instanceof File)){\r\n                        throw new MethodCallValidationMetadataException(`Item at position ${i} of \"files\" is not a Blob or a File`);\r\n                    }\r\n                }else{\r\n                    if(!(files[i] instanceof ArrayBuffer)\r\n                        && !(files[i] instanceof Uint8Array)\r\n                        && !(files[i].constructor.name === 'ReadStream')\r\n                        && !(files[i] instanceof Buffer)){\r\n                        throw new MethodCallValidationMetadataException(`Item at position ${i} of \"files\" is not a Blob or a File`);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        let paramNames = Object.keys(parameters);\r\n\r\n        paramNames.forEach((key)=>{\r\n            if(!(key in methodMeta.parameters)){\r\n                throw new MethodCallValidationMetadataException(`Parameter \"${key}\" is not valid for method \"${methodName}\"`);\r\n            }\r\n            //TODO: Type checks\r\n        });\r\n\r\n        //We expect _files to be missing, as it's passed separately\r\n        let missing = Object.keys(methodMeta.parameters).filter((key)=>paramNames.indexOf(key) < 0 && key !== '_files');\r\n\r\n        if(missing.length){\r\n            throw new MethodCallValidationMetadataException(`Parameters [${missing.join(',')}] not present for method \"${methodName}\"`);\r\n        }\r\n\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     * Validate the transaction list call against the app metadata\r\n     * @param {string} methodName - the methods name\r\n     * @param {Object} parameters - the parameters for the query\r\n     * @returns {boolean}\r\n     * @throws {MissingMetadataException} - App Metadata not yet retrieved\r\n     * @throws {BadMetadataException} - App Metadata doesn't have methods\r\n     * @throws {MethodCallValidationMetadataException} - Method call fails validation\r\n     */\r\n    validateGetCall(methodName, parameters){\r\n        if (!this.metadata) {\r\n            throw new MissingMetadataException(\"App Metadata not yet retrieved\");\r\n        }\r\n\r\n        if (!this.metadata.methods) {\r\n            throw new BadMetadataException(\"App Metadata doesn't have methods!\");\r\n        }\r\n\r\n        if(!(methodName in this.metadata.methods)){\r\n            throw new MethodCallValidationMetadataException(`Method \"${methodName}\" not found`);\r\n        }\r\n\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     * Validate the transaction list call against the app metadata\r\n     * @returns {boolean}\r\n     * @throws {MissingMetadataException} - App Metadata not yet retrieved\r\n     * @throws {BadMetadataException} - App Metadata doesn't have methods\r\n     */\r\n    validateAnyGetCall(){\r\n        if (!this.metadata) {\r\n            throw new MissingMetadataException(\"App Metadata not yet retrieved\");\r\n        }\r\n\r\n        if (!this.metadata.methods) {\r\n            throw new BadMetadataException(\"App Metadata doesn't have methods!\");\r\n        }\r\n\r\n        return true;\r\n    }\r\n}\r\n",
    "static": true,
    "longname": "C:/Users/keyz/Code/libsimba-js/src/simba/simbabase.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 148,
    "kind": "class",
    "name": "SimbaBase",
    "memberof": "src/simba/simbabase.js",
    "static": true,
    "longname": "src/simba/simbabase.js~SimbaBase",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/simba/simbabase.js",
    "importStyle": "SimbaBase",
    "description": "",
    "lineNumber": 15,
    "interface": false
  },
  {
    "__docId__": 149,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#constructor",
    "access": "public",
    "description": "Base class for libsimba API Interaction implementations",
    "lineNumber": 21,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "endpoint",
        "description": "The endpoint of the API"
      },
      {
        "nullable": null,
        "types": [
          "Wallet"
        ],
        "spread": false,
        "optional": true,
        "name": "wallet",
        "description": "an optional {@link Wallet} instance"
      }
    ]
  },
  {
    "__docId__": 150,
    "kind": "member",
    "name": "endpoint",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#endpoint",
    "access": "public",
    "description": null,
    "lineNumber": 23,
    "undocument": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 152,
    "kind": "member",
    "name": "wallet",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#wallet",
    "access": "public",
    "description": null,
    "lineNumber": 27,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 153,
    "kind": "member",
    "name": "metadata",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#metadata",
    "access": "public",
    "description": null,
    "lineNumber": 29,
    "undocument": true,
    "type": {
      "types": [
        "{}"
      ]
    }
  },
  {
    "__docId__": 154,
    "kind": "method",
    "name": "initialize",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#initialize",
    "access": "public",
    "description": "",
    "lineNumber": 105,
    "abstract": true,
    "params": [],
    "return": null
  },
  {
    "__docId__": 155,
    "kind": "method",
    "name": "callMethod",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#callMethod",
    "access": "public",
    "description": "",
    "lineNumber": 116,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "method",
        "description": "the method to call"
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "parameters",
        "description": "the parameters for the method"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "a promise resolving with the transaction details"
    },
    "abstract": true
  },
  {
    "__docId__": 156,
    "kind": "method",
    "name": "getMethodTransactions",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#getMethodTransactions",
    "access": "public",
    "description": "",
    "lineNumber": 126,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "method",
        "description": "The method"
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "parameters",
        "description": "The query parameters"
      }
    ],
    "abstract": true,
    "return": null
  },
  {
    "__docId__": 157,
    "kind": "method",
    "name": "getTransaction",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#getTransaction",
    "access": "public",
    "description": "",
    "lineNumber": 136,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<Object>} - The transaction"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "transactionIdOrHash",
        "description": "Either a transaction ID or a transaction hash"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<Object>"
      ],
      "spread": false,
      "description": "The transaction"
    },
    "abstract": true
  },
  {
    "__docId__": 158,
    "kind": "method",
    "name": "getBundleMetadataForTransaction",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#getBundleMetadataForTransaction",
    "access": "public",
    "description": "",
    "lineNumber": 146,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<Object>} - The bundle metadata"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "transactionIdOrHash",
        "description": "Either a transaction ID or a transaction hash"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<Object>"
      ],
      "spread": false,
      "description": "The bundle metadata"
    },
    "abstract": true
  },
  {
    "__docId__": 159,
    "kind": "method",
    "name": "getBundleForTransaction",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#getBundleForTransaction",
    "access": "public",
    "description": "",
    "lineNumber": 157,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<ReadableStream|Blob>} - The bundle"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "transactionIdOrHash",
        "description": "Either a transaction ID or a transaction hash"
      },
      {
        "nullable": null,
        "types": [
          "boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "stream",
        "description": "If true, returns a {@link ReadableStream}, otherwise returns a {@link Blob}"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<ReadableStream|Blob>"
      ],
      "spread": false,
      "description": "The bundle"
    },
    "abstract": true
  },
  {
    "__docId__": 160,
    "kind": "method",
    "name": "getFileFromBundleForTransaction",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#getFileFromBundleForTransaction",
    "access": "public",
    "description": "",
    "lineNumber": 169,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<ReadableStream|Blob>} - The file"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "transactionIdOrHash",
        "description": "Either a transaction ID or a transaction hash"
      },
      {
        "nullable": null,
        "types": [
          "number"
        ],
        "spread": false,
        "optional": false,
        "name": "fileIdx",
        "description": "The index of the file in the bundle metadata"
      },
      {
        "nullable": null,
        "types": [
          "boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "stream",
        "description": "If true, returns a {@link ReadableStream}, otherwise returns a {@link Blob}"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<ReadableStream|Blob>"
      ],
      "spread": false,
      "description": "The file"
    },
    "abstract": true
  },
  {
    "__docId__": 161,
    "kind": "method",
    "name": "getFileFromBundleByNameForTransaction",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#getFileFromBundleByNameForTransaction",
    "access": "public",
    "description": "",
    "lineNumber": 181,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<ReadableStream|Blob>} - The file"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "transactionIdOrHash",
        "description": "Either a transaction ID or a transaction hash"
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "fileName",
        "description": "The name of the file in the bundle metadata"
      },
      {
        "nullable": null,
        "types": [
          "boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "stream",
        "description": "If true, returns a {@link ReadableStream}, otherwise returns a {@link Blob}"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<ReadableStream|Blob>"
      ],
      "spread": false,
      "description": "The file"
    },
    "abstract": true
  },
  {
    "__docId__": 162,
    "kind": "method",
    "name": "getTransactions",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#getTransactions",
    "access": "public",
    "description": "",
    "lineNumber": 191,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<PagedResponse>} - A response wrapped in a {@link PagedResponse} helper"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "parameters",
        "description": "The query parameters"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<PagedResponse>"
      ],
      "spread": false,
      "description": "A response wrapped in a {@link PagedResponse} helper"
    },
    "abstract": true
  },
  {
    "__docId__": 163,
    "kind": "method",
    "name": "sendTransactionRequest",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": true,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#sendTransactionRequest",
    "access": "public",
    "description": "",
    "lineNumber": 201,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<PagedResponse>} - A response wrapped in a {@link PagedResponse} helper"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "URL"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "The URL"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<PagedResponse>"
      ],
      "spread": false,
      "description": "A response wrapped in a {@link PagedResponse} helper"
    },
    "abstract": true
  },
  {
    "__docId__": 164,
    "kind": "method",
    "name": "callMethodWithFile",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#callMethodWithFile",
    "access": "public",
    "description": "",
    "lineNumber": 213,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "method",
        "description": "the method to call"
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "parameters",
        "description": "the parameters for the method"
      },
      {
        "nullable": null,
        "types": [
          "Array<Blob|File>"
        ],
        "spread": false,
        "optional": false,
        "name": "files",
        "description": "the files"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<Object>"
      ],
      "spread": false,
      "description": "a promise resolving with the transaction details"
    },
    "abstract": true
  },
  {
    "__docId__": 165,
    "kind": "method",
    "name": "getTransactionStatus",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#getTransactionStatus",
    "access": "public",
    "description": "",
    "lineNumber": 223,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "txnId",
        "description": "the transaction ID"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<Object>"
      ],
      "spread": false,
      "description": "a promise resolving with the transaction details"
    },
    "abstract": true
  },
  {
    "__docId__": 166,
    "kind": "method",
    "name": "checkTransactionStatusFromObject",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#checkTransactionStatusFromObject",
    "access": "private",
    "description": "",
    "lineNumber": 234,
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "txn",
        "description": "a transaction object"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": "an object with status details"
    },
    "abstract": true
  },
  {
    "__docId__": 167,
    "kind": "method",
    "name": "checkTransactionDone",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#checkTransactionDone",
    "access": "private",
    "description": "",
    "lineNumber": 245,
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "txn",
        "description": "the transaction object"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "boolean"
      ],
      "spread": false,
      "description": "is the transaction complete"
    },
    "abstract": true
  },
  {
    "__docId__": 168,
    "kind": "method",
    "name": "checkTransactionStatus",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#checkTransactionStatus",
    "access": "public",
    "description": "",
    "lineNumber": 255,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "txnId",
        "description": "a transaction ID"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": "an object with status details"
    },
    "abstract": true
  },
  {
    "__docId__": 169,
    "kind": "method",
    "name": "getBalance",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#getBalance",
    "access": "public",
    "description": "",
    "lineNumber": 264,
    "return": {
      "nullable": null,
      "types": [
        "Promise<Object>"
      ],
      "spread": false,
      "description": "the balance"
    },
    "abstract": true,
    "params": []
  },
  {
    "__docId__": 170,
    "kind": "method",
    "name": "addFunds",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#addFunds",
    "access": "public",
    "description": "",
    "lineNumber": 287,
    "return": {
      "nullable": null,
      "types": [
        "Promise<Object>"
      ],
      "spread": false,
      "description": "details of the txn"
    },
    "abstract": true,
    "params": []
  },
  {
    "__docId__": 171,
    "kind": "method",
    "name": "waitForSuccessOrError",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#waitForSuccessOrError",
    "access": "public",
    "description": "Returns an object with 'future' and 'cancel' keys.\nfuture is the promise to listen on for the response or an error.\ncancel is a function - call it to cancel the polling.",
    "lineNumber": 298,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "txnId",
        "description": "the transaction ID"
      },
      {
        "nullable": null,
        "types": [
          "number"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "5000",
        "defaultRaw": 5000,
        "name": "pollInterval",
        "description": "the interval in ms for polling"
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 172,
    "kind": "method",
    "name": "setWallet",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#setWallet",
    "access": "public",
    "description": "Set the wallet",
    "lineNumber": 312,
    "params": [
      {
        "nullable": null,
        "types": [
          "Wallet"
        ],
        "spread": false,
        "optional": false,
        "name": "wallet",
        "description": "the wallet"
      }
    ],
    "return": null
  },
  {
    "__docId__": 174,
    "kind": "method",
    "name": "setApiKey",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#setApiKey",
    "access": "public",
    "description": "Set the API Key to authenticate calls",
    "lineNumber": 320,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "apiKey",
        "description": "the API Key"
      }
    ],
    "return": null
  },
  {
    "__docId__": 175,
    "kind": "member",
    "name": "apiKey",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#apiKey",
    "access": "public",
    "description": null,
    "lineNumber": 321,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 176,
    "kind": "method",
    "name": "setManagementKey",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#setManagementKey",
    "access": "public",
    "description": "Set the API Key to authenticate management calls",
    "lineNumber": 328,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "managementKey",
        "description": "the management API Key"
      }
    ],
    "return": null
  },
  {
    "__docId__": 177,
    "kind": "member",
    "name": "managementKey",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#managementKey",
    "access": "public",
    "description": null,
    "lineNumber": 329,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 178,
    "kind": "method",
    "name": "apiAuthHeaders",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#apiAuthHeaders",
    "access": "private",
    "description": "",
    "lineNumber": 337,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{{APIKEY: *, \"Content-Type\": string}}"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "{APIKEY: *, \"Content-Type\": string}"
      ],
      "spread": false,
      "description": ""
    },
    "params": []
  },
  {
    "__docId__": 179,
    "kind": "method",
    "name": "managementAuthHeaders",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#managementAuthHeaders",
    "access": "private",
    "description": "",
    "lineNumber": 348,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{{APIKEY: *, \"Content-Type\": string}}"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "{APIKEY: *, \"Content-Type\": string}"
      ],
      "spread": false,
      "description": ""
    },
    "params": []
  },
  {
    "__docId__": 180,
    "kind": "method",
    "name": "validateCall",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#validateCall",
    "access": "private",
    "description": "",
    "lineNumber": 365,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{boolean}"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "methodName",
        "description": "the methods name"
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "parameters",
        "description": "the parameters for the method call"
      },
      {
        "nullable": null,
        "types": [
          "Array"
        ],
        "spread": false,
        "optional": true,
        "name": "files",
        "description": "Optional array of files"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "boolean"
      ],
      "spread": false,
      "description": ""
    },
    "throws": [
      {
        "types": [
          "MissingMetadataException"
        ],
        "description": "App Metadata not yet retrieved"
      },
      {
        "types": [
          "BadMetadataException"
        ],
        "description": "App Metadata doesn't have methods"
      },
      {
        "types": [
          "MethodCallValidationMetadataException"
        ],
        "description": "Method call fails validation"
      }
    ]
  },
  {
    "__docId__": 181,
    "kind": "method",
    "name": "validateGetCall",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#validateGetCall",
    "access": "private",
    "description": "",
    "lineNumber": 434,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{boolean}"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "methodName",
        "description": "the methods name"
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "parameters",
        "description": "the parameters for the query"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "boolean"
      ],
      "spread": false,
      "description": ""
    },
    "throws": [
      {
        "types": [
          "MissingMetadataException"
        ],
        "description": "App Metadata not yet retrieved"
      },
      {
        "types": [
          "BadMetadataException"
        ],
        "description": "App Metadata doesn't have methods"
      },
      {
        "types": [
          "MethodCallValidationMetadataException"
        ],
        "description": "Method call fails validation"
      }
    ]
  },
  {
    "__docId__": 182,
    "kind": "method",
    "name": "validateAnyGetCall",
    "memberof": "src/simba/simbabase.js~SimbaBase",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/simba/simbabase.js~SimbaBase#validateAnyGetCall",
    "access": "private",
    "description": "",
    "lineNumber": 457,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{boolean}"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "boolean"
      ],
      "spread": false,
      "description": ""
    },
    "throws": [
      {
        "types": [
          "MissingMetadataException"
        ],
        "description": "App Metadata not yet retrieved"
      },
      {
        "types": [
          "BadMetadataException"
        ],
        "description": "App Metadata doesn't have methods"
      }
    ],
    "params": []
  },
  {
    "__docId__": 183,
    "kind": "file",
    "name": "src/wallet/index.js",
    "content": "import Wallet from './wallet';\r\nimport LocalWallet from './localwallet';\r\nimport PKWallet from './pkwallet';\r\n\r\nexport {\r\n    Wallet,\r\n    LocalWallet,\r\n    PKWallet\r\n}\r\n",
    "static": true,
    "longname": "C:/Users/keyz/Code/libsimba-js/src/wallet/index.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 184,
    "kind": "file",
    "name": "src/wallet/localwallet.js",
    "content": "import Wallet from './wallet';\r\nimport { Wallet as EthersWallet } from '@ethersproject/wallet';\r\nimport { SigningException, UserRejectedSigningException, WalletNotFoundException, WalletLockedException, NotInBrowserException} from \"../exceptions\";\r\n\r\n/**\r\n * libsimba-js Local Wallet implementation\r\n * Stores the wallet as encrypted json within the browsers localstorage\r\n * Wraps the [ethersjs]{@link https://docs.ethers.io/ethers.js/html/} library.\r\n */\r\nexport default class LocalWallet extends Wallet {\r\n    /**\r\n     * Use a wallet stored in the browsers local storage\r\n     * @param {function} [signingConfirmation] -  - an optional callback for requesting user permission to sign a\r\n     * transaction. Should resolve a promise with true for accept, and false (or reject) for reject.\r\n     */\r\n    constructor(signingConfirmation) {\r\n        super(signingConfirmation);\r\n        if(typeof window === 'undefined') {\r\n            throw new NotInBrowserException(\"LocalWallet can only be used in a browser!\");\r\n        }\r\n\r\n        this.window = window;\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Unlock the wallet\r\n     * @param {string} passkey - The pass key to unlock the wallet\r\n     * @param {function} [progressCB] - A callback, accepting a number between 0-1, indicating decryption progress\r\n     * @returns {Promise} - Returns a promise resolving when the wallet is unlocked\r\n     */\r\n    unlockWallet(passkey, progressCB){\r\n        return EthersWallet.fromEncryptedJson(this.window.localStorage.getItem('localwallet'), passkey, progressCB)\r\n            .then(wallet=>this.wallet = wallet);\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Generate a wallet\r\n     * @param {string} passkey - The pass key to lock the wallet\r\n     * @param {function} [progressCB] - A callback, accepting a number between 0-1, indicating decryption progress\r\n     * @returns {Promise} - Returns a promise resolving when the wallet is created\r\n     */\r\n    generateWallet(passkey, progressCB){\r\n        this.wallet = EthersWallet.createRandom();\r\n        return this.wallet.encrypt(passkey, progressCB).then((json)=>{\r\n            this.window.localStorage.setItem('localwallet', json);\r\n            return true;\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Generate a wallet from an existing private key\r\n     * @param {string} key - The existing private key\r\n     * @param {string} passkey - The pass key to lock the wallet\r\n     * @param {function} [progressCB] - A callback, accepting a number between 0-1, indicating decryption progress\r\n     * @returns {Promise} - Returns a promise resolving when the wallet is created\r\n     */\r\n    generateWalletFromPrivateKey(key, passkey, progressCB){\r\n        this.wallet = new EthersWallet(key);\r\n        return this.wallet.encrypt(passkey, progressCB).then((json)=>{\r\n            this.window.localStorage.setItem('localwallet', json);\r\n            return true;\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Generate a wallet from a mnemonic\r\n     * @param {string} mnemonic - The mnemonic\r\n     * @param {string} passkey - The pass key to lock the wallet\r\n     * @param {function} [progressCB] - A callback, accepting a number between 0-1, indicating decryption progress\r\n     * @returns {Promise} - Returns a promise resolving when the wallet is created\r\n     */\r\n    generateWalletFromMnemonic(mnemonic, passkey, progressCB){\r\n        this.wallet = EthersWallet.fromMnemonic(mnemonic);\r\n        return this.wallet.encrypt(passkey, progressCB).then((json)=>{\r\n            this.window.localStorage.setItem('localwallet', json);\r\n            return true;\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Generate a wallet from a encrypted json (see\r\n     * [ethers docs]{@link https://docs.ethers.io/ethers.js/html/api-wallet.html?highlight=fromencryptedjson})\r\n     * @param {string} json - The json\r\n     * @param {string} passkey - The pass key to lock the wallet\r\n     * @param {function} [progressCB] - A callback, accepting a number between 0-1, indicating decryption progress\r\n     * @returns {Promise} - Returns a promise resolving when the wallet is created\r\n     */\r\n    generateWalletFromEncryptedJson(json, passkey, progressCB){\r\n        this.wallet = EthersWallet.fromEncryptedJson(mnemonic, passkey);\r\n        return this.wallet.encrypt(passkey, progressCB).then((json)=>{\r\n            this.window.localStorage.setItem('localwallet', json);\r\n            return true;\r\n        });\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Delete the wallet\r\n     */\r\n    deleteWallet(){\r\n        this.window.localStorage.removeItem('localwallet');\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Check if a wallet exists\r\n     * @return {boolean} - does the wallet exist\r\n     */\r\n    walletExists(){\r\n        return !!this.window.localStorage.getItem('localwallet');\r\n    }\r\n\r\n    /**\r\n     * The mnemonic phrase for this wallet, or null if the mnemonic is unknown.\r\n     * @return {string} - The mnemonic phrase for this wallet, or null if the mnemonic is unknown.\r\n     */\r\n    getMnemonic(){\r\n        if(!this.walletExists()){\r\n            throw new WalletNotFoundException(\"No wallet generated!\")\r\n        }\r\n        if(!this.wallet) {\r\n            throw new WalletLockedException(\"Wallet not unlocked!\");\r\n        }\r\n\r\n        return this.wallet.mnemonic;\r\n    }\r\n\r\n    /**\r\n     *\r\n     * @param {string} passkey - Passkey to encrypt the wallet\r\n     * @param {function} [progressCB] - An optional callback to monitor progress of encryption, calls with a value between 0-1\r\n     * @returns {Promise<string>} A promise that resolves with the JSON wallet\r\n     */\r\n    getEncryptedJson(passkey, progressCB){\r\n        if(!this.walletExists()){\r\n            throw new WalletNotFoundException(\"No wallet generated!\")\r\n        }\r\n        if(!this.wallet) {\r\n            throw new WalletLockedException(\"Wallet not unlocked!\");\r\n        }\r\n\r\n        return this.wallet.encrypt(passkey, progressCB);\r\n    }\r\n\r\n    /**\r\n     * @protected\r\n     * @override\r\n     * Sign a transaction payload\r\n     * @param {Object} payload - The transaction to sign\r\n     * @returns {Promise<string>} - Returns a promise resolving to the signed transaction\r\n     */\r\n    sign(payload) {\r\n        if(!this.walletExists()){\r\n            throw new WalletNotFoundException(\"No wallet generated!\")\r\n        }\r\n        if(!this.wallet) {\r\n            throw new WalletLockedException(\"Wallet not unlocked!\");\r\n        }\r\n\r\n        return this.signingConfirmation().then(allow=>{\r\n            if(allow){\r\n                const cleanedPayload = this.cleanPayload(payload);\r\n                return this.wallet.signTransaction(cleanedPayload)\r\n                    .catch(error=>{throw new SigningException(\"Failed to sign transaction\", error)});\r\n            }\r\n            throw new UserRejectedSigningException(\"User rejected signing\");\r\n        });\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     * Clean the payload before signing\r\n     * @param {Object} payload - The transaction to clean\r\n     * @returns {string} - The cleaned transaction\r\n     */\r\n    cleanPayload(payload){\r\n        const allowedKeys = [ 'to','nonce','gasLimit','gasPrice', 'data','value','chainId'];\r\n\r\n        let cleanedPayload = {};\r\n\r\n        Object.keys(payload).forEach(key=>{\r\n            if(allowedKeys.indexOf(key) >= 0){\r\n                cleanedPayload[key] = payload[key];\r\n                if((typeof payload[key] === 'string' || payload[key] instanceof String) &&\r\n                    payload[key].startsWith('0x') &&\r\n                    payload[key].length % 2 !== 0){\r\n                    cleanedPayload[key] = payload[key].replace('0x', '0x0');\r\n                    console.log(`Bad Hex - txn.${key} = ${payload[key]}, reformatted to ${cleanedPayload[key]}`);\r\n                }\r\n            }\r\n        });\r\n\r\n        return cleanedPayload;\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Get the wallets address\r\n     * @returns {Promise<string>} - Returns a promise resolving to the wallets address\r\n     */\r\n    getAddress(){\r\n        return this.wallet.getAddress();\r\n    }\r\n}\r\n",
    "static": true,
    "longname": "C:/Users/keyz/Code/libsimba-js/src/wallet/localwallet.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 185,
    "kind": "class",
    "name": "LocalWallet",
    "memberof": "src/wallet/localwallet.js",
    "static": true,
    "longname": "src/wallet/localwallet.js~LocalWallet",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/wallet/localwallet.js",
    "importStyle": "LocalWallet",
    "description": "libsimba-js Local Wallet implementation\nStores the wallet as encrypted json within the browsers localstorage\nWraps the [ethersjs]{@link https://docs.ethers.io/ethers.js/html/} library.",
    "lineNumber": 10,
    "interface": false,
    "extends": [
      "src/wallet/wallet.js~Wallet"
    ]
  },
  {
    "__docId__": 186,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/wallet/localwallet.js~LocalWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/localwallet.js~LocalWallet#constructor",
    "access": "public",
    "description": "Use a wallet stored in the browsers local storage",
    "lineNumber": 16,
    "params": [
      {
        "nullable": null,
        "types": [
          "function"
        ],
        "spread": false,
        "optional": true,
        "name": "signingConfirmation",
        "description": "- an optional callback for requesting user permission to sign a\ntransaction. Should resolve a promise with true for accept, and false (or reject) for reject."
      }
    ]
  },
  {
    "__docId__": 187,
    "kind": "member",
    "name": "window",
    "memberof": "src/wallet/localwallet.js~LocalWallet",
    "static": false,
    "longname": "src/wallet/localwallet.js~LocalWallet#window",
    "access": "public",
    "description": null,
    "lineNumber": 22,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 188,
    "kind": "method",
    "name": "unlockWallet",
    "memberof": "src/wallet/localwallet.js~LocalWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/localwallet.js~LocalWallet#unlockWallet",
    "access": "public",
    "description": "",
    "lineNumber": 32,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise} - Returns a promise resolving when the wallet is unlocked"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "passkey",
        "description": "The pass key to unlock the wallet"
      },
      {
        "nullable": null,
        "types": [
          "function"
        ],
        "spread": false,
        "optional": true,
        "name": "progressCB",
        "description": "A callback, accepting a number between 0-1, indicating decryption progress"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "Returns a promise resolving when the wallet is unlocked"
    },
    "override": true
  },
  {
    "__docId__": 189,
    "kind": "method",
    "name": "generateWallet",
    "memberof": "src/wallet/localwallet.js~LocalWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/localwallet.js~LocalWallet#generateWallet",
    "access": "public",
    "description": "",
    "lineNumber": 44,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise} - Returns a promise resolving when the wallet is created"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "passkey",
        "description": "The pass key to lock the wallet"
      },
      {
        "nullable": null,
        "types": [
          "function"
        ],
        "spread": false,
        "optional": true,
        "name": "progressCB",
        "description": "A callback, accepting a number between 0-1, indicating decryption progress"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "Returns a promise resolving when the wallet is created"
    },
    "override": true
  },
  {
    "__docId__": 190,
    "kind": "member",
    "name": "wallet",
    "memberof": "src/wallet/localwallet.js~LocalWallet",
    "static": false,
    "longname": "src/wallet/localwallet.js~LocalWallet#wallet",
    "access": "public",
    "description": null,
    "lineNumber": 45,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 191,
    "kind": "method",
    "name": "generateWalletFromPrivateKey",
    "memberof": "src/wallet/localwallet.js~LocalWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/localwallet.js~LocalWallet#generateWalletFromPrivateKey",
    "access": "public",
    "description": "Generate a wallet from an existing private key",
    "lineNumber": 59,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise} - Returns a promise resolving when the wallet is created"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "key",
        "description": "The existing private key"
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "passkey",
        "description": "The pass key to lock the wallet"
      },
      {
        "nullable": null,
        "types": [
          "function"
        ],
        "spread": false,
        "optional": true,
        "name": "progressCB",
        "description": "A callback, accepting a number between 0-1, indicating decryption progress"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "Returns a promise resolving when the wallet is created"
    }
  },
  {
    "__docId__": 193,
    "kind": "method",
    "name": "generateWalletFromMnemonic",
    "memberof": "src/wallet/localwallet.js~LocalWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/localwallet.js~LocalWallet#generateWalletFromMnemonic",
    "access": "public",
    "description": "Generate a wallet from a mnemonic",
    "lineNumber": 74,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise} - Returns a promise resolving when the wallet is created"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "mnemonic",
        "description": "The mnemonic"
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "passkey",
        "description": "The pass key to lock the wallet"
      },
      {
        "nullable": null,
        "types": [
          "function"
        ],
        "spread": false,
        "optional": true,
        "name": "progressCB",
        "description": "A callback, accepting a number between 0-1, indicating decryption progress"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "Returns a promise resolving when the wallet is created"
    }
  },
  {
    "__docId__": 195,
    "kind": "method",
    "name": "generateWalletFromEncryptedJson",
    "memberof": "src/wallet/localwallet.js~LocalWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/localwallet.js~LocalWallet#generateWalletFromEncryptedJson",
    "access": "public",
    "description": "Generate a wallet from a encrypted json (see\n[ethers docs]{@link https://docs.ethers.io/ethers.js/html/api-wallet.html?highlight=fromencryptedjson})",
    "lineNumber": 90,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise} - Returns a promise resolving when the wallet is created"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "json",
        "description": "The json"
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "passkey",
        "description": "The pass key to lock the wallet"
      },
      {
        "nullable": null,
        "types": [
          "function"
        ],
        "spread": false,
        "optional": true,
        "name": "progressCB",
        "description": "A callback, accepting a number between 0-1, indicating decryption progress"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "Returns a promise resolving when the wallet is created"
    }
  },
  {
    "__docId__": 197,
    "kind": "method",
    "name": "deleteWallet",
    "memberof": "src/wallet/localwallet.js~LocalWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/localwallet.js~LocalWallet#deleteWallet",
    "access": "public",
    "description": "",
    "lineNumber": 102,
    "override": true,
    "params": [],
    "return": null
  },
  {
    "__docId__": 198,
    "kind": "method",
    "name": "walletExists",
    "memberof": "src/wallet/localwallet.js~LocalWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/localwallet.js~LocalWallet#walletExists",
    "access": "public",
    "description": "",
    "lineNumber": 111,
    "return": {
      "nullable": null,
      "types": [
        "boolean"
      ],
      "spread": false,
      "description": "does the wallet exist"
    },
    "override": true,
    "params": []
  },
  {
    "__docId__": 199,
    "kind": "method",
    "name": "getMnemonic",
    "memberof": "src/wallet/localwallet.js~LocalWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/localwallet.js~LocalWallet#getMnemonic",
    "access": "public",
    "description": "The mnemonic phrase for this wallet, or null if the mnemonic is unknown.",
    "lineNumber": 119,
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "The mnemonic phrase for this wallet, or null if the mnemonic is unknown."
    },
    "params": []
  },
  {
    "__docId__": 200,
    "kind": "method",
    "name": "getEncryptedJson",
    "memberof": "src/wallet/localwallet.js~LocalWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/localwallet.js~LocalWallet#getEncryptedJson",
    "access": "public",
    "description": "",
    "lineNumber": 136,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<string>} A promise that resolves with the JSON wallet"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "passkey",
        "description": "Passkey to encrypt the wallet"
      },
      {
        "nullable": null,
        "types": [
          "function"
        ],
        "spread": false,
        "optional": true,
        "name": "progressCB",
        "description": "An optional callback to monitor progress of encryption, calls with a value between 0-1"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<string>"
      ],
      "spread": false,
      "description": "A promise that resolves with the JSON wallet"
    }
  },
  {
    "__docId__": 201,
    "kind": "method",
    "name": "sign",
    "memberof": "src/wallet/localwallet.js~LocalWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/localwallet.js~LocalWallet#sign",
    "access": "protected",
    "description": "",
    "lineNumber": 154,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<string>} - Returns a promise resolving to the signed transaction"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "payload",
        "description": "The transaction to sign"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<string>"
      ],
      "spread": false,
      "description": "Returns a promise resolving to the signed transaction"
    },
    "override": true
  },
  {
    "__docId__": 202,
    "kind": "method",
    "name": "cleanPayload",
    "memberof": "src/wallet/localwallet.js~LocalWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/localwallet.js~LocalWallet#cleanPayload",
    "access": "private",
    "description": "",
    "lineNumber": 178,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - The cleaned transaction"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "payload",
        "description": "The transaction to clean"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "The cleaned transaction"
    }
  },
  {
    "__docId__": 203,
    "kind": "method",
    "name": "getAddress",
    "memberof": "src/wallet/localwallet.js~LocalWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/localwallet.js~LocalWallet#getAddress",
    "access": "public",
    "description": "",
    "lineNumber": 203,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<string>} - Returns a promise resolving to the wallets address"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<string>"
      ],
      "spread": false,
      "description": "Returns a promise resolving to the wallets address"
    },
    "override": true,
    "params": []
  },
  {
    "__docId__": 204,
    "kind": "file",
    "name": "src/wallet/pkwallet.js",
    "content": "import Wallet from './wallet';\r\nimport { Wallet as EthersWallet } from '@ethersproject/wallet';\r\nimport { SigningException, UserRejectedSigningException, WalletNotFoundException, WalletLockedException} from \"../exceptions\";\r\n\r\n/**\r\n * libsimba-js Private Key Wallet implementation\r\n * Use when you already have access to the decrypted private key\r\n * Wraps the [ethersjs]{@link https://docs.ethers.io/ethers.js/html/} library.\r\n */\r\nexport default class PKWallet extends Wallet {\r\n    /**\r\n     * Use when you already have access to the decrypted private key\r\n     * @param {string} [private_key] - The private key in hexidecimal format\r\n     * @param {function} [signingConfirmation] -  - an optional callback for requesting user permission to sign a\r\n     * transaction. Should resolve a promise with true for accept, and false (or reject) for reject.\r\n     */\r\n    constructor(private_key, signingConfirmation) {\r\n        super(signingConfirmation);\r\n        this.pk = private_key;\r\n        this.wallet = new EthersWallet(this.pk);\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Unlock the wallet - noop for this wallet\r\n     * @param {string} passkey - The pass key to unlock the wallet\r\n     * @param {function} [progressCB] - A callback, accepting a number between 0-1, indicating decryption progress\r\n     * @returns {Promise} - Returns a promise resolving when the wallet is unlocked\r\n     */\r\n    unlockWallet(passkey, progressCB){\r\n        return Promise.resolve();\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Generate a wallet\r\n     * @param {string} passkey - The pass key to lock the wallet\r\n     * @param {function} [progressCB] - A callback, accepting a number between 0-1, indicating decryption progress\r\n     * @returns {Promise} - Returns a promise resolving with the private key when the wallet is created\r\n     */\r\n    generateWallet(progressCB){\r\n        this.wallet = EthersWallet.createRandom();\r\n        this.pk = this.wallet.privateKey;\r\n        return Promise.resolve(this.pk);\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Delete the wallet\r\n     */\r\n    deleteWallet(){}\r\n\r\n    /**\r\n     * @override\r\n     * Check if a wallet exists\r\n     * @return {boolean} - does the wallet exist\r\n     */\r\n    walletExists(){\r\n        return !!this.pk && !!this.wallet;\r\n    }\r\n\r\n    /**\r\n     * The mnemonic phrase for this wallet, or null if the mnemonic is unknown.\r\n     * @return {string} - The mnemonic phrase for this wallet, or null if the mnemonic is unknown.\r\n     */\r\n    getMnemonic(){\r\n        if(!this.walletExists()){\r\n            throw new WalletNotFoundException(\"No wallet generated!\")\r\n        }\r\n        if(!this.wallet) {\r\n            throw new WalletLockedException(\"Wallet not unlocked!\");\r\n        }\r\n\r\n        return this.wallet.mnemonic;\r\n    }\r\n\r\n    /**\r\n     *\r\n     * @param {string} passkey - Passkey to encrypt the wallet\r\n     * @param {function} [progressCB] - An optional callback to monitor progress of encryption, calls with a value between 0-1\r\n     * @returns {Promise<string>} A promise that resolves with the JSON wallet\r\n     */\r\n    getEncryptedJson(passkey, progressCB){\r\n        if(!this.walletExists()){\r\n            throw new WalletNotFoundException(\"No wallet generated!\")\r\n        }\r\n        if(!this.wallet) {\r\n            throw new WalletLockedException(\"Wallet not unlocked!\");\r\n        }\r\n\r\n        return this.wallet.encrypt(passkey, progressCB);\r\n    }\r\n\r\n    /**\r\n     * @protected\r\n     * @override\r\n     * Sign a transaction payload\r\n     * @param {Object} payload - The transaction to sign\r\n     * @returns {Promise<string>} - Returns a promise resolving to the signed transaction\r\n     */\r\n    sign(payload) {\r\n        if(!this.walletExists()){\r\n            throw new WalletNotFoundException(\"No wallet generated!\")\r\n        }\r\n        if(!this.wallet) {\r\n            throw new WalletLockedException(\"Wallet not unlocked!\");\r\n        }\r\n\r\n        return this.signingConfirmation().then(allow=>{\r\n            if(allow){\r\n                const cleanedPayload = this.cleanPayload(payload);\r\n                return this.wallet.signTransaction(cleanedPayload)\r\n                    .catch(error=>{throw new SigningException(\"Failed to sign transaction\", error)});\r\n            }\r\n            throw new UserRejectedSigningException(\"User rejected signing\");\r\n        });\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     * Clean the payload before signing\r\n     * @param {Object} payload - The transaction to clean\r\n     * @returns {string} - The cleaned transaction\r\n     */\r\n    cleanPayload(payload){\r\n        const allowedKeys = [ 'to','nonce','gasLimit','gasPrice', 'data','value','chainId'];\r\n\r\n        let cleanedPayload = {};\r\n\r\n        Object.keys(payload).forEach(key=>{\r\n            if(allowedKeys.indexOf(key) >= 0){\r\n                cleanedPayload[key] = payload[key];\r\n                if((typeof payload[key] === 'string' || payload[key] instanceof String) &&\r\n                    payload[key].startsWith('0x') &&\r\n                    payload[key].length % 2 !== 0){\r\n                    cleanedPayload[key] = payload[key].replace('0x', '0x0');\r\n                    console.log(`Bad Hex - txn.${key} = ${payload[key]}, reformatted to ${cleanedPayload[key]}`);\r\n                }\r\n            }\r\n        });\r\n\r\n        return cleanedPayload;\r\n    }\r\n\r\n    /**\r\n     * @override\r\n     * Get the wallets address\r\n     * @returns {Promise<string>} - Returns a promise resolving to the wallets address\r\n     */\r\n    getAddress(){\r\n        return this.wallet.getAddress();\r\n    }\r\n}\r\n",
    "static": true,
    "longname": "C:/Users/keyz/Code/libsimba-js/src/wallet/pkwallet.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 205,
    "kind": "class",
    "name": "PKWallet",
    "memberof": "src/wallet/pkwallet.js",
    "static": true,
    "longname": "src/wallet/pkwallet.js~PKWallet",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/wallet/pkwallet.js",
    "importStyle": "PKWallet",
    "description": "libsimba-js Private Key Wallet implementation\nUse when you already have access to the decrypted private key\nWraps the [ethersjs]{@link https://docs.ethers.io/ethers.js/html/} library.",
    "lineNumber": 10,
    "interface": false,
    "extends": [
      "src/wallet/wallet.js~Wallet"
    ]
  },
  {
    "__docId__": 206,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/wallet/pkwallet.js~PKWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/pkwallet.js~PKWallet#constructor",
    "access": "public",
    "description": "Use when you already have access to the decrypted private key",
    "lineNumber": 17,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": true,
        "name": "private_key",
        "description": "The private key in hexidecimal format"
      },
      {
        "nullable": null,
        "types": [
          "function"
        ],
        "spread": false,
        "optional": true,
        "name": "signingConfirmation",
        "description": "- an optional callback for requesting user permission to sign a\ntransaction. Should resolve a promise with true for accept, and false (or reject) for reject."
      }
    ]
  },
  {
    "__docId__": 207,
    "kind": "member",
    "name": "pk",
    "memberof": "src/wallet/pkwallet.js~PKWallet",
    "static": false,
    "longname": "src/wallet/pkwallet.js~PKWallet#pk",
    "access": "public",
    "description": null,
    "lineNumber": 19,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 208,
    "kind": "member",
    "name": "wallet",
    "memberof": "src/wallet/pkwallet.js~PKWallet",
    "static": false,
    "longname": "src/wallet/pkwallet.js~PKWallet#wallet",
    "access": "public",
    "description": null,
    "lineNumber": 20,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 209,
    "kind": "method",
    "name": "unlockWallet",
    "memberof": "src/wallet/pkwallet.js~PKWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/pkwallet.js~PKWallet#unlockWallet",
    "access": "public",
    "description": "",
    "lineNumber": 30,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise} - Returns a promise resolving when the wallet is unlocked"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "passkey",
        "description": "The pass key to unlock the wallet"
      },
      {
        "nullable": null,
        "types": [
          "function"
        ],
        "spread": false,
        "optional": true,
        "name": "progressCB",
        "description": "A callback, accepting a number between 0-1, indicating decryption progress"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "Returns a promise resolving when the wallet is unlocked"
    },
    "override": true
  },
  {
    "__docId__": 210,
    "kind": "method",
    "name": "generateWallet",
    "memberof": "src/wallet/pkwallet.js~PKWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/pkwallet.js~PKWallet#generateWallet",
    "access": "public",
    "description": "",
    "lineNumber": 41,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise} - Returns a promise resolving with the private key when the wallet is created"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "passkey",
        "description": "The pass key to lock the wallet"
      },
      {
        "nullable": null,
        "types": [
          "function"
        ],
        "spread": false,
        "optional": true,
        "name": "progressCB",
        "description": "A callback, accepting a number between 0-1, indicating decryption progress"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "Returns a promise resolving with the private key when the wallet is created"
    },
    "override": true
  },
  {
    "__docId__": 213,
    "kind": "method",
    "name": "deleteWallet",
    "memberof": "src/wallet/pkwallet.js~PKWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/pkwallet.js~PKWallet#deleteWallet",
    "access": "public",
    "description": "",
    "lineNumber": 51,
    "override": true,
    "params": [],
    "return": null
  },
  {
    "__docId__": 214,
    "kind": "method",
    "name": "walletExists",
    "memberof": "src/wallet/pkwallet.js~PKWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/pkwallet.js~PKWallet#walletExists",
    "access": "public",
    "description": "",
    "lineNumber": 58,
    "return": {
      "nullable": null,
      "types": [
        "boolean"
      ],
      "spread": false,
      "description": "does the wallet exist"
    },
    "override": true,
    "params": []
  },
  {
    "__docId__": 215,
    "kind": "method",
    "name": "getMnemonic",
    "memberof": "src/wallet/pkwallet.js~PKWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/pkwallet.js~PKWallet#getMnemonic",
    "access": "public",
    "description": "The mnemonic phrase for this wallet, or null if the mnemonic is unknown.",
    "lineNumber": 66,
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "The mnemonic phrase for this wallet, or null if the mnemonic is unknown."
    },
    "params": []
  },
  {
    "__docId__": 216,
    "kind": "method",
    "name": "getEncryptedJson",
    "memberof": "src/wallet/pkwallet.js~PKWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/pkwallet.js~PKWallet#getEncryptedJson",
    "access": "public",
    "description": "",
    "lineNumber": 83,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<string>} A promise that resolves with the JSON wallet"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "passkey",
        "description": "Passkey to encrypt the wallet"
      },
      {
        "nullable": null,
        "types": [
          "function"
        ],
        "spread": false,
        "optional": true,
        "name": "progressCB",
        "description": "An optional callback to monitor progress of encryption, calls with a value between 0-1"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<string>"
      ],
      "spread": false,
      "description": "A promise that resolves with the JSON wallet"
    }
  },
  {
    "__docId__": 217,
    "kind": "method",
    "name": "sign",
    "memberof": "src/wallet/pkwallet.js~PKWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/pkwallet.js~PKWallet#sign",
    "access": "protected",
    "description": "",
    "lineNumber": 101,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<string>} - Returns a promise resolving to the signed transaction"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "payload",
        "description": "The transaction to sign"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<string>"
      ],
      "spread": false,
      "description": "Returns a promise resolving to the signed transaction"
    },
    "override": true
  },
  {
    "__docId__": 218,
    "kind": "method",
    "name": "cleanPayload",
    "memberof": "src/wallet/pkwallet.js~PKWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/pkwallet.js~PKWallet#cleanPayload",
    "access": "private",
    "description": "",
    "lineNumber": 125,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - The cleaned transaction"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "payload",
        "description": "The transaction to clean"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "The cleaned transaction"
    }
  },
  {
    "__docId__": 219,
    "kind": "method",
    "name": "getAddress",
    "memberof": "src/wallet/pkwallet.js~PKWallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/pkwallet.js~PKWallet#getAddress",
    "access": "public",
    "description": "",
    "lineNumber": 150,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<string>} - Returns a promise resolving to the wallets address"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<string>"
      ],
      "spread": false,
      "description": "Returns a promise resolving to the wallets address"
    },
    "override": true,
    "params": []
  },
  {
    "__docId__": 220,
    "kind": "file",
    "name": "src/wallet/wallet.js",
    "content": "/**\r\n * @interface\r\n * Base class for libsimba Wallet implementations\r\n */\r\nexport default class Wallet {\r\n    /**\r\n     * Base class for libsimba Wallet implementations\r\n     * @param signingConfirmation {function} - an optional callback for requesting user permission to sign a\r\n     * transaction. Should resolve a promise with true for accept, and false (or reject) for reject.\r\n     */\r\n    constructor(signingConfirmation) {\r\n        if(!signingConfirmation){\r\n            signingConfirmation = ()=>Promise.resolve(true);\r\n        }\r\n        this.signingConfirmation = signingConfirmation;\r\n        if (this.constructor === Wallet) {\r\n            throw new TypeError('Can not construct abstract class.');\r\n        }\r\n\r\n        if (this.unlockWallet === Wallet.prototype.unlockWallet) {\r\n            throw new TypeError('Please implement abstract method unlockWallet.');\r\n        }\r\n\r\n        if (this.generateWallet === Wallet.prototype.generateWallet) {\r\n            throw new TypeError('Please implement abstract method generateWallet.');\r\n        }\r\n\r\n        if (this.deleteWallet === Wallet.prototype.deleteWallet) {\r\n            throw new TypeError('Please implement abstract method deleteWallet.');\r\n        }\r\n\r\n        if (this.walletExists === Wallet.prototype.walletExists) {\r\n            throw new TypeError('Please implement abstract method walletExists.');\r\n        }\r\n\r\n        if (this.sign === Wallet.prototype.sign) {\r\n            throw new TypeError('Please implement abstract method sign.');\r\n        }\r\n\r\n        if (this.getAddress === Wallet.prototype.getAddress) {\r\n            throw new TypeError('Please implement abstract method getAddress.');\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Unlock the wallet\r\n     * @param {string} passkey - The pass key to unlock the wallet\r\n     * @returns {Promise} - Returns a promise resolving when the wallet is unlocked\r\n     */\r\n    unlockWallet(passkey) {\r\n        throw new Error('Wallet.unlockWallet Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Generate a wallet\r\n     * @param {string} passkey - The pass key to lock the wallet\r\n     * @returns {Promise} - Returns a promise resolving when the wallet is created\r\n     */\r\n    generateWallet(passkey) {\r\n        throw new Error('Wallet.unlockWallet Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Delete the wallet\r\n     */\r\n    deleteWallet() {\r\n        throw new Error('Wallet.deleteWallet Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Check if a wallet exists\r\n     * @return {boolean} - does the wallet exist\r\n     */\r\n    walletExists() {\r\n        throw new Error('Wallet.deleteWallet Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @protected\r\n     * @abstract\r\n     * (Abstract) Sign a transaction payload\r\n     * @param {Object} payload - The transaction to sign\r\n     * @returns {Promise<string>} - Returns a promise resolving to the signed transaction\r\n     */\r\n    sign(payload) {\r\n        throw new Error('Wallet.sign Not Implemented');\r\n    }\r\n\r\n    /**\r\n     * @abstract\r\n     * (Abstract) Get the wallets address\r\n     * @returns {Promise<string>} - Returns a promise resolving to the wallets address\r\n     */\r\n    getAddress(){\r\n        throw new Error('Wallet.sign Not Implemented');\r\n    }\r\n}\r\n",
    "static": true,
    "longname": "C:/Users/keyz/Code/libsimba-js/src/wallet/wallet.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 221,
    "kind": "class",
    "name": "Wallet",
    "memberof": "src/wallet/wallet.js",
    "static": true,
    "longname": "src/wallet/wallet.js~Wallet",
    "access": "public",
    "export": true,
    "importPath": "@simbachain/libsimba-js/src/wallet/wallet.js",
    "importStyle": "Wallet",
    "description": "",
    "lineNumber": 5,
    "interface": false
  },
  {
    "__docId__": 222,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "src/wallet/wallet.js~Wallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/wallet.js~Wallet#constructor",
    "access": "public",
    "description": "Base class for libsimba Wallet implementations",
    "lineNumber": 11,
    "params": [
      {
        "nullable": null,
        "types": [
          "*"
        ],
        "spread": false,
        "optional": false,
        "name": "signingConfirmation",
        "description": "{function} - an optional callback for requesting user permission to sign a\ntransaction. Should resolve a promise with true for accept, and false (or reject) for reject."
      }
    ]
  },
  {
    "__docId__": 223,
    "kind": "member",
    "name": "signingConfirmation",
    "memberof": "src/wallet/wallet.js~Wallet",
    "static": false,
    "longname": "src/wallet/wallet.js~Wallet#signingConfirmation",
    "access": "public",
    "description": null,
    "lineNumber": 15,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 224,
    "kind": "method",
    "name": "unlockWallet",
    "memberof": "src/wallet/wallet.js~Wallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/wallet.js~Wallet#unlockWallet",
    "access": "public",
    "description": "",
    "lineNumber": 51,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise} - Returns a promise resolving when the wallet is unlocked"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "passkey",
        "description": "The pass key to unlock the wallet"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "Returns a promise resolving when the wallet is unlocked"
    },
    "abstract": true
  },
  {
    "__docId__": 225,
    "kind": "method",
    "name": "generateWallet",
    "memberof": "src/wallet/wallet.js~Wallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/wallet.js~Wallet#generateWallet",
    "access": "public",
    "description": "",
    "lineNumber": 61,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise} - Returns a promise resolving when the wallet is created"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "passkey",
        "description": "The pass key to lock the wallet"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "Returns a promise resolving when the wallet is created"
    },
    "abstract": true
  },
  {
    "__docId__": 226,
    "kind": "method",
    "name": "deleteWallet",
    "memberof": "src/wallet/wallet.js~Wallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/wallet.js~Wallet#deleteWallet",
    "access": "public",
    "description": "",
    "lineNumber": 69,
    "abstract": true,
    "params": [],
    "return": null
  },
  {
    "__docId__": 227,
    "kind": "method",
    "name": "walletExists",
    "memberof": "src/wallet/wallet.js~Wallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/wallet.js~Wallet#walletExists",
    "access": "public",
    "description": "",
    "lineNumber": 78,
    "return": {
      "nullable": null,
      "types": [
        "boolean"
      ],
      "spread": false,
      "description": "does the wallet exist"
    },
    "abstract": true,
    "params": []
  },
  {
    "__docId__": 228,
    "kind": "method",
    "name": "sign",
    "memberof": "src/wallet/wallet.js~Wallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/wallet.js~Wallet#sign",
    "access": "protected",
    "description": "",
    "lineNumber": 89,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<string>} - Returns a promise resolving to the signed transaction"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "payload",
        "description": "The transaction to sign"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<string>"
      ],
      "spread": false,
      "description": "Returns a promise resolving to the signed transaction"
    },
    "abstract": true
  },
  {
    "__docId__": 229,
    "kind": "method",
    "name": "getAddress",
    "memberof": "src/wallet/wallet.js~Wallet",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "src/wallet/wallet.js~Wallet#getAddress",
    "access": "public",
    "description": "",
    "lineNumber": 98,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise<string>} - Returns a promise resolving to the wallets address"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise<string>"
      ],
      "spread": false,
      "description": "Returns a promise resolving to the wallets address"
    },
    "abstract": true,
    "params": []
  },
  {
    "kind": "index",
    "content": "<h1 align=\"center\">Welcome to libsimba-js</h1>\r\n<p>\r\n  <a href=\"https://www.npmjs.com/package/@simbachain/libsimba-js\">\r\n    <img alt=\"npm\" src=\"https://img.shields.io/npm/dw/@simbachain/libsimba-js?style=flat\">  \r\n  </a>\r\n  <a href=\"https://simbachain.github.io/libsimba-js/\">\r\n    <img alt=\"Documentation\" src=\"https://img.shields.io/badge/documentation-yes-brightgreen.svg?style=flat\" target=\"_blank\" />\r\n  </a>\r\n  <a href=\"https://github.com/SIMBAChain/libsimba-js/blob/master/LICENSE\">\r\n    <img alt=\"License: MIT\" src=\"https://img.shields.io/badge/License-MIT-yellow.svg?style=flat\" target=\"_blank\" />\r\n  </a>\r\n  <img alt=\"azure\" src=\"https://dev.azure.com/SimbaChain/libSimba/_apis/build/status/SIMBAChain.libsimba-js-develop?branchName=develop\">\r\n</p>\r\n\r\n> libsimba-js is a library simplifying the use of SIMBAChain APIs. We aim to abstract away the various blockchain concepts, reducing the necessary time needed to get to working code.\r\n\r\n### [🏠 Homepage](https://github.com/simbachain/libsimba-js#readme)\r\n### [📝 Documentation](https://simbachain.github.io/libsimba-js/)\r\n\r\n## Install\r\n\r\n```sh\r\nnpm install @simbachain/libsimba-js\r\n```\r\n\r\n## Usage\r\n\r\n- ES2105 module import\r\n```javascript\r\nimport * as libsimba from '@simbachain/libsimba-js';\r\nlibsimba.getSimbaInstance(...);\r\n```\r\n- CommonJS module require\r\n```javascript\r\nconst libsimba  = require('@simbachain/libsimba-js');\r\nlibsimba.getSimbaInstance(...);\r\n```\r\n- AMD module require\r\n```javascript\r\nrequire(['@simbachain/libsimba-js'], function (libsimba) {\r\n    libsimba.getSimbaInstance(...);\r\n});\r\n```\r\n- `<script>` tag import\r\n```html\r\n<!doctype html>\r\n<html>\r\n  ...\r\n  <script src=\"./dist/libsimba.js\"></script>\r\n  <script>\r\n    // ...\r\n    // Global variable\r\n    libsimba.getSimbaInstance(...);\r\n    // Property in the window object\r\n    window.libsimba.getSimbaInstance(...);\r\n    // ...\r\n  </script>\r\n</html>\r\n```\r\n\r\n## Examples\r\n\r\nSee [here](https://simbachain.github.io/libsimba-js/example.html)\r\n\r\n## Contributing\r\n\r\nContributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/simbachain/libsimba-js/issues).\r\n\r\n## License\r\n\r\nCopyright © 2019 [SIMBAChain Inc](https://simbachain.com/).<br />\r\nThis project is [MIT](https://github.com/SIMBAChain/libsimba-js/blob/master/LICENSE) licensed.\r\n",
    "longname": "C:\\Users\\keyz\\Code\\libsimba-js\\README.md",
    "name": "./README.md",
    "static": true,
    "access": "public"
  },
  {
    "kind": "packageJSON",
    "content": "{\r\n    \"name\": \"@simbachain/libsimba-js\",\r\n    \"version\": \"0.5.8\",\r\n    \"description\": \"libsimba-js is a library simplifying the use of SIMBAChain APIs. We aim to abstract away the various blockchain concepts, reducing the necessary time needed to get to working code.\",\r\n    \"homepage\": \"\",\r\n    \"main\": \"lib/libsimba.js\",\r\n    \"module\": \"src/index.js\",\r\n    \"browser\": {\r\n        \"./lib/libsimba.js\": \"./dist/libsimba.js\"\r\n    },\r\n    \"scripts\": {\r\n        \"testonly\": \"npx mocha --reporter mocha-junit-reporter --require @babel/register\",\r\n        \"start\": \"webpack-dev-server --config webpack.dev.js --mode development\",\r\n        \"preview\": \"npm run buildonly && http-server dist\",\r\n        \"commit\": \"git-cz\",\r\n        \"push\": \"git push --follow-tags origin master\",\r\n        \"webpack\": \"webpack --config webpack.prod.js --mode production\",\r\n        \"docs\": \"npx esdoc && npx copy-files-from-to --config .copy-examples.json\",\r\n        \"build\": \"npx run-s webpack docs\",\r\n        \"test\": \"npx nyc npx mocha --reporter mocha-junit-reporter --require @babel/register\",\r\n        \"validate\": \"node ./.hooks/checkBranch.js && npm i && npm run test\",\r\n        \"buildonly\": \"webpack --config webpack.prod.js --mode production\",\r\n        \"prerelease\": \"npm run validate\",\r\n        \"postrelease\": \"npx run-s push\",\r\n        \"release\": \"npx standard-version -a\",\r\n        \"publish-npmjs\": \"npm publish . --access public\"\r\n    },\r\n    \"standard-version\": {\r\n        \"scripts\": {\r\n            \"postchangelog\": \"npx run-s build && git add .\"\r\n        }\r\n    },\r\n    \"repository\": {\r\n        \"type\": \"git\",\r\n        \"url\": \"git+https://github.com/simbachain/libsimba-js.git\"\r\n    },\r\n    \"bugs\": {\r\n        \"url\": \"https://github.com/simbachain/libsimba-js/issues\"\r\n    },\r\n    \"nyc\": {\r\n        \"reporter\": [\r\n            \"text\",\r\n            \"cobertura\",\r\n            \"html\"\r\n        ]\r\n    },\r\n    \"engines\": {\r\n        \"npm\": \">=6\",\r\n        \"node\": \">=10\"\r\n    },\r\n    \"keywords\": [\r\n        \"simba\",\r\n        \"simbachain\",\r\n        \"blockchain\",\r\n        \"ethereum\"\r\n    ],\r\n    \"author\": \"Kieran David Evans <kieran.evans@simbachain.com>\",\r\n    \"license\": \"MIT\",\r\n    \"dependencies\": {\r\n        \"@ethersproject/wallet\": \"^5.0.0-beta.131\",\r\n        \"axios\": \"^0.19.0\",\r\n        \"core-js\": \"3.2.1\",\r\n        \"cross-fetch\": \"^3.0.4\",\r\n        \"form-data\": \"^3.0.0\",\r\n        \"poll-js\": \"0.0.3\"\r\n    },\r\n    \"devDependencies\": {\r\n        \"@babel/core\": \"^7.6.0\",\r\n        \"@babel/plugin-proposal-object-rest-spread\": \"~7.5.5\",\r\n        \"@babel/plugin-transform-classes\": \"^7.5.5\",\r\n        \"@babel/plugin-transform-proto-to-assign\": \"^7.5.5\",\r\n        \"@babel/plugin-transform-runtime\": \"^7.6.0\",\r\n        \"@babel/preset-env\": \"^7.6.0\",\r\n        \"@babel/register\": \"^7.6.0\",\r\n        \"@babel/runtime\": \"^7.6.0\",\r\n        \"ajv\": \"6.10.2\",\r\n        \"babel-loader\": \"8.0.6\",\r\n        \"chai\": \"^4.2.0\",\r\n        \"clean-webpack-plugin\": \"3.0.0\",\r\n        \"commitizen\": \"^4.0.3\",\r\n        \"copy-files-from-to\": \"^2.1.0\",\r\n        \"copy-webpack-plugin\": \"^5.0.4\",\r\n        \"cz-conventional-changelog\": \"^3.0.2\",\r\n        \"esdoc\": \"^1.1.0\",\r\n        \"esdoc-ecmascript-proposal-plugin\": \"^1.0.0\",\r\n        \"esdoc-standard-plugin\": \"^1.0.0\",\r\n        \"file-loader\": \"4.2.0\",\r\n        \"html-webpack-plugin\": \"^4.0.0-beta.8\",\r\n        \"http-server\": \"0.11.1\",\r\n        \"mocha\": \"^6.2.0\",\r\n        \"mocha-junit-reporter\": \"^1.23.1\",\r\n        \"npm-run-all\": \"^4.1.5\",\r\n        \"nyc\": \"^14.1.1\",\r\n        \"sinon\": \"^7.4.2\",\r\n        \"source-map-loader\": \"0.2.4\",\r\n        \"standard-version\": \"^8.0.2\",\r\n        \"terser-webpack-plugin\": \"^2.2.1\",\r\n        \"typedoc\": \"^0.15.0\",\r\n        \"url-loader\": \"2.2.0\",\r\n        \"webpack\": \"4.41.1\",\r\n        \"webpack-bundle-analyzer\": \"^3.5.0\",\r\n        \"webpack-cli\": \"3.3.9\",\r\n        \"webpack-dev-server\": \"3.8.2\",\r\n        \"yargs\": \"~14.1.0\"\r\n    },\r\n    \"config\": {\r\n        \"commitizen\": {\r\n            \"path\": \"./node_modules/cz-conventional-changelog\"\r\n        }\r\n    },\r\n    \"browserslist\": \"> 0.5%, last 2 versions, Firefox ESR, not dead\"\r\n}\r\n",
    "longname": "C:\\Users\\keyz\\Code\\libsimba-js\\package.json",
    "name": "package.json",
    "static": true,
    "access": "public"
  },
  {
    "__docId__": 230,
    "kind": "testFile",
    "name": "test/localwallet.spec.js",
    "content": "import { expect } from \"chai\";\r\n\r\ndescribe(\"src/wallet/localwallet.js\", () => {\r\n    // let wallet = new LocalWallet(SigningConfirmationTrue);\r\n    describe(\"unlockWallet\", () => {\r\n        it(\"should call wallet.fromEncryptedJson!\", () => {\r\n            expect(true).to.equal(true);\r\n        });\r\n    });\r\n});\r\n",
    "static": true,
    "longname": "C:/Users/keyz/Code/libsimba-js/test/localwallet.spec.js",
    "access": null,
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 231,
    "kind": "test",
    "name": "describe0",
    "testId": 0,
    "memberof": "test/localwallet.spec.js",
    "testDepth": 0,
    "static": true,
    "longname": "test/localwallet.spec.js~describe0",
    "access": null,
    "description": "src/wallet/localwallet.js",
    "lineNumber": 3
  },
  {
    "__docId__": 232,
    "kind": "test",
    "name": "describe1",
    "testId": 1,
    "memberof": "test/localwallet.spec.js~describe0",
    "testDepth": 1,
    "static": true,
    "longname": "test/localwallet.spec.js~describe0.describe1",
    "access": null,
    "description": "unlockWallet",
    "lineNumber": 5
  },
  {
    "__docId__": 233,
    "kind": "test",
    "name": "it2",
    "testId": 2,
    "memberof": "test/localwallet.spec.js~describe0.describe1",
    "testDepth": 2,
    "static": true,
    "longname": "test/localwallet.spec.js~describe0.describe1.it2",
    "access": null,
    "description": "should call wallet.fromEncryptedJson!",
    "lineNumber": 6
  },
  {
    "__docId__": 234,
    "kind": "testFile",
    "name": "test/simba.spec.js",
    "content": "import {expect} from 'chai';\r\nimport sinon from 'sinon';\r\n\r\nimport { Simba } from '../src/simba/simba';\r\nimport { Wallet } from '../src/wallet';\r\n\r\nconst TestData = {\r\n    address: '',\r\n    payload: '',\r\n    signed: ''\r\n};\r\n\r\nclass DummyWallet extends Wallet {\r\n    constructor() {\r\n        super();\r\n\r\n        this.getAddress = sinon.fake.resolves(TestData.address);\r\n        this.sign = sinon.fake.resolves(TestData.signed);\r\n    }\r\n}\r\n\r\ndescribe(\"src/simba.js\", () => {\r\n    describe(\"sayHello function\", () => {\r\n        it(\"should say Hello guys!\", () => {\r\n            expect(\"Hello guys!\").to.equal(\"Hello guys!\")\r\n        });\r\n    });\r\n});\r\n",
    "static": true,
    "longname": "C:/Users/keyz/Code/libsimba-js/test/simba.spec.js",
    "access": null,
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 235,
    "kind": "test",
    "name": "describe3",
    "testId": 3,
    "memberof": "test/simba.spec.js",
    "testDepth": 0,
    "static": true,
    "longname": "test/simba.spec.js~describe3",
    "access": null,
    "description": "src/simba.js",
    "lineNumber": 22
  },
  {
    "__docId__": 236,
    "kind": "test",
    "name": "describe4",
    "testId": 4,
    "memberof": "test/simba.spec.js~describe3",
    "testDepth": 1,
    "static": true,
    "longname": "test/simba.spec.js~describe3.describe4",
    "access": null,
    "description": "sayHello function",
    "lineNumber": 23
  },
  {
    "__docId__": 237,
    "kind": "test",
    "name": "it5",
    "testId": 5,
    "memberof": "test/simba.spec.js~describe3.describe4",
    "testDepth": 2,
    "static": true,
    "longname": "test/simba.spec.js~describe3.describe4.it5",
    "access": null,
    "description": "should say Hello guys!",
    "lineNumber": 24
  }
]