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