@simbachain/libsimba-js
Version:
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.
1,502 lines (1,501 loc) • 210 kB
JSON
[
{
"__docId__": 1,
"kind": "external",
"name": "Infinity",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Infinity",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 2,
"kind": "external",
"name": "NaN",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~NaN",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 3,
"kind": "external",
"name": "undefined",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~undefined",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 4,
"kind": "external",
"name": "null",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~null",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 5,
"kind": "external",
"name": "Object",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Object",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 6,
"kind": "external",
"name": "object",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~object",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 7,
"kind": "external",
"name": "Function",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Function",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 8,
"kind": "external",
"name": "function",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~function",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 9,
"kind": "external",
"name": "Boolean",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Boolean",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 10,
"kind": "external",
"name": "boolean",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~boolean",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 11,
"kind": "external",
"name": "Symbol",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Symbol",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 12,
"kind": "external",
"name": "Error",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Error",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 13,
"kind": "external",
"name": "EvalError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~EvalError",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 14,
"kind": "external",
"name": "InternalError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~InternalError",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 15,
"kind": "external",
"name": "RangeError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~RangeError",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 16,
"kind": "external",
"name": "ReferenceError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~ReferenceError",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 17,
"kind": "external",
"name": "SyntaxError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~SyntaxError",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 18,
"kind": "external",
"name": "TypeError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~TypeError",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 19,
"kind": "external",
"name": "URIError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~URIError",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 20,
"kind": "external",
"name": "Number",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Number",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 21,
"kind": "external",
"name": "number",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~number",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 22,
"kind": "external",
"name": "Date",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Date",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 23,
"kind": "external",
"name": "String",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~String",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 24,
"kind": "external",
"name": "string",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~string",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 25,
"kind": "external",
"name": "RegExp",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~RegExp",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 26,
"kind": "external",
"name": "Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 27,
"kind": "external",
"name": "Int8Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Int8Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 28,
"kind": "external",
"name": "Uint8Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Uint8Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 29,
"kind": "external",
"name": "Uint8ClampedArray",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Uint8ClampedArray",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 30,
"kind": "external",
"name": "Int16Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Int16Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 31,
"kind": "external",
"name": "Uint16Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Uint16Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 32,
"kind": "external",
"name": "Int32Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Int32Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 33,
"kind": "external",
"name": "Uint32Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Uint32Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 34,
"kind": "external",
"name": "Float32Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Float32Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 35,
"kind": "external",
"name": "Float64Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Float64Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 36,
"kind": "external",
"name": "Map",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Map",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 37,
"kind": "external",
"name": "Set",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Set",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 38,
"kind": "external",
"name": "WeakMap",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~WeakMap",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 39,
"kind": "external",
"name": "WeakSet",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~WeakSet",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 40,
"kind": "external",
"name": "ArrayBuffer",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~ArrayBuffer",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 41,
"kind": "external",
"name": "DataView",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~DataView",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 42,
"kind": "external",
"name": "JSON",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~JSON",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 43,
"kind": "external",
"name": "Promise",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Promise",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 44,
"kind": "external",
"name": "Generator",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Generator",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 45,
"kind": "external",
"name": "GeneratorFunction",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~GeneratorFunction",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 46,
"kind": "external",
"name": "Reflect",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Reflect",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 47,
"kind": "external",
"name": "Proxy",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy",
"memberof": "src/.external-ecmascript.js",
"static": true,
"longname": "src/.external-ecmascript.js~Proxy",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 48,
"kind": "file",
"name": "src/exceptions.js",
"content": "/**\r\n * Base exception that all libsimba Exceptions extend\r\n */\r\nexport class BaseException extends Error{\r\n /**\r\n * Base exception that all libsimba Exceptions extend\r\n * @param {string} message - the error message\r\n * @param {Error|string} [cause] - (Optional) wrap an existing error\r\n */\r\n constructor(message, cause){\r\n super();\r\n this.name = 'BaseException';\r\n\r\n if('response' in message){\r\n this.message = message.response.data;\r\n this.cause = cause || message;\r\n }else{\r\n this.message = message;\r\n this.cause = cause;\r\n }\r\n\r\n // Maintains proper stack trace for where our error was thrown (only available on V8)\r\n if (Error.captureStackTrace) {\r\n Error.captureStackTrace(this, this.constructor);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when a method that should be implemented is not\r\n */\r\nexport class NotImplementedException extends BaseException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'NotImplementedException';\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when a method on a class inheriting [SimbaBase]{@link SimbaBase} is called before\r\n * metadata is retrieved.\r\n */\r\nexport class MissingMetadataException extends BaseException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'MissingMetadataException';\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when metadata doesn't have something it should have\r\n */\r\nexport class BadMetadataException extends BaseException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'BadMetadataException';\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when a method call isn't valid\r\n */\r\nexport class MethodCallValidationMetadataException extends BaseException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'MethodCallValidationMetadataException';\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when the server fails to generate the transaction for signing\r\n */\r\nexport class GenerateTransactionException extends BaseException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'GenerateTransactionException';\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when the server returns an error after submitting a signed transaction\r\n */\r\nexport class SubmitTransactionException extends BaseException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'SubmitTransactionException';\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when the server returns an error when querying transactions\r\n */\r\nexport class GetRequestException extends BaseException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'GetRequestException';\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when the server returns an error when querying transactions\r\n */\r\nexport class PostRequestException extends BaseException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'PostRequestException';\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when the server returns an error when querying transactions\r\n */\r\nexport class GetTransactionsException extends GetRequestException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'GetTransactionsException';\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when an error occurs checking a transactions status\r\n */\r\nexport class TransactionStatusCheckException extends BaseException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'TransactionStatusCheckException';\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when there's an error signing a transaction\r\n */\r\nexport class SigningException extends BaseException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'SigningException';\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when a LocalWallet is created in a non browser environment\r\n */\r\nexport class NotInBrowserException extends BaseException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'NotInBrowserException';\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when the user rejects the request to sign\r\n */\r\nexport class UserRejectedSigningException extends SigningException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'UserRejectedSigningException';\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when a method on a class inheriting [SimbaBase]{@link SimbaBase} is called that requires\r\n * a [Wallet]{@link Wallet} to be set, and it isn't.\r\n */\r\nexport class WalletNotFoundException extends SigningException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'WalletNotFoundException';\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when a method on a class inheriting [SimbaBase]{@link SimbaBase} is called that requires\r\n * a [Wallet]{@link Wallet} to be unlocked, and it isn't.\r\n */\r\nexport class WalletLockedException extends SigningException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'WalletLockedException';\r\n }\r\n}\r\n\r\n/**\r\n * Thrown when a method call exceeds the max retries\r\n */\r\nexport class RetriesExceededException extends SigningException{\r\n constructor(...args){\r\n super(...args);\r\n this.name = 'RetriesExceededException';\r\n }\r\n}\r\n\r\n",
"static": true,
"longname": "C:/Users/keyz/Code/libsimba-js/src/exceptions.js",
"access": "public",
"description": null,
"lineNumber": 1
},
{
"__docId__": 49,
"kind": "class",
"name": "BaseException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~BaseException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{BaseException}",
"description": "Base exception that all libsimba Exceptions extend",
"lineNumber": 4,
"interface": false,
"extends": [
"Error"
]
},
{
"__docId__": 50,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~BaseException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~BaseException#constructor",
"access": "public",
"description": "Base exception that all libsimba Exceptions extend",
"lineNumber": 10,
"params": [
{
"nullable": null,
"types": [
"string"
],
"spread": false,
"optional": false,
"name": "message",
"description": "the error message"
},
{
"nullable": null,
"types": [
"Error",
"string"
],
"spread": false,
"optional": true,
"name": "cause",
"description": "(Optional) wrap an existing error"
}
]
},
{
"__docId__": 51,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~BaseException",
"static": false,
"longname": "src/exceptions.js~BaseException#name",
"access": "public",
"description": null,
"lineNumber": 12,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 52,
"kind": "member",
"name": "message",
"memberof": "src/exceptions.js~BaseException",
"static": false,
"longname": "src/exceptions.js~BaseException#message",
"access": "public",
"description": null,
"lineNumber": 15,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 53,
"kind": "member",
"name": "cause",
"memberof": "src/exceptions.js~BaseException",
"static": false,
"longname": "src/exceptions.js~BaseException#cause",
"access": "public",
"description": null,
"lineNumber": 16,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 56,
"kind": "class",
"name": "NotImplementedException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~NotImplementedException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{NotImplementedException}",
"description": "Thrown when a method that should be implemented is not",
"lineNumber": 32,
"interface": false,
"extends": [
"BaseException"
]
},
{
"__docId__": 57,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~NotImplementedException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~NotImplementedException#constructor",
"access": "public",
"description": null,
"lineNumber": 33,
"undocument": true
},
{
"__docId__": 58,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~NotImplementedException",
"static": false,
"longname": "src/exceptions.js~NotImplementedException#name",
"access": "public",
"description": null,
"lineNumber": 35,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 59,
"kind": "class",
"name": "MissingMetadataException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~MissingMetadataException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{MissingMetadataException}",
"description": "Thrown when a method on a class inheriting [SimbaBase]{@link SimbaBase} is called before\nmetadata is retrieved.",
"lineNumber": 43,
"interface": false,
"extends": [
"BaseException"
]
},
{
"__docId__": 60,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~MissingMetadataException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~MissingMetadataException#constructor",
"access": "public",
"description": null,
"lineNumber": 44,
"undocument": true
},
{
"__docId__": 61,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~MissingMetadataException",
"static": false,
"longname": "src/exceptions.js~MissingMetadataException#name",
"access": "public",
"description": null,
"lineNumber": 46,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 62,
"kind": "class",
"name": "BadMetadataException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~BadMetadataException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{BadMetadataException}",
"description": "Thrown when metadata doesn't have something it should have",
"lineNumber": 53,
"interface": false,
"extends": [
"BaseException"
]
},
{
"__docId__": 63,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~BadMetadataException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~BadMetadataException#constructor",
"access": "public",
"description": null,
"lineNumber": 54,
"undocument": true
},
{
"__docId__": 64,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~BadMetadataException",
"static": false,
"longname": "src/exceptions.js~BadMetadataException#name",
"access": "public",
"description": null,
"lineNumber": 56,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 65,
"kind": "class",
"name": "MethodCallValidationMetadataException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~MethodCallValidationMetadataException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{MethodCallValidationMetadataException}",
"description": "Thrown when a method call isn't valid",
"lineNumber": 63,
"interface": false,
"extends": [
"BaseException"
]
},
{
"__docId__": 66,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~MethodCallValidationMetadataException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~MethodCallValidationMetadataException#constructor",
"access": "public",
"description": null,
"lineNumber": 64,
"undocument": true
},
{
"__docId__": 67,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~MethodCallValidationMetadataException",
"static": false,
"longname": "src/exceptions.js~MethodCallValidationMetadataException#name",
"access": "public",
"description": null,
"lineNumber": 66,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 68,
"kind": "class",
"name": "GenerateTransactionException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~GenerateTransactionException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{GenerateTransactionException}",
"description": "Thrown when the server fails to generate the transaction for signing",
"lineNumber": 73,
"interface": false,
"extends": [
"BaseException"
]
},
{
"__docId__": 69,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~GenerateTransactionException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~GenerateTransactionException#constructor",
"access": "public",
"description": null,
"lineNumber": 74,
"undocument": true
},
{
"__docId__": 70,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~GenerateTransactionException",
"static": false,
"longname": "src/exceptions.js~GenerateTransactionException#name",
"access": "public",
"description": null,
"lineNumber": 76,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 71,
"kind": "class",
"name": "SubmitTransactionException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~SubmitTransactionException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{SubmitTransactionException}",
"description": "Thrown when the server returns an error after submitting a signed transaction",
"lineNumber": 83,
"interface": false,
"extends": [
"BaseException"
]
},
{
"__docId__": 72,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~SubmitTransactionException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~SubmitTransactionException#constructor",
"access": "public",
"description": null,
"lineNumber": 84,
"undocument": true
},
{
"__docId__": 73,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~SubmitTransactionException",
"static": false,
"longname": "src/exceptions.js~SubmitTransactionException#name",
"access": "public",
"description": null,
"lineNumber": 86,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 74,
"kind": "class",
"name": "GetRequestException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~GetRequestException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{GetRequestException}",
"description": "Thrown when the server returns an error when querying transactions",
"lineNumber": 93,
"interface": false,
"extends": [
"BaseException"
]
},
{
"__docId__": 75,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~GetRequestException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~GetRequestException#constructor",
"access": "public",
"description": null,
"lineNumber": 94,
"undocument": true
},
{
"__docId__": 76,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~GetRequestException",
"static": false,
"longname": "src/exceptions.js~GetRequestException#name",
"access": "public",
"description": null,
"lineNumber": 96,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 77,
"kind": "class",
"name": "PostRequestException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~PostRequestException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{PostRequestException}",
"description": "Thrown when the server returns an error when querying transactions",
"lineNumber": 103,
"interface": false,
"extends": [
"BaseException"
]
},
{
"__docId__": 78,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~PostRequestException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~PostRequestException#constructor",
"access": "public",
"description": null,
"lineNumber": 104,
"undocument": true
},
{
"__docId__": 79,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~PostRequestException",
"static": false,
"longname": "src/exceptions.js~PostRequestException#name",
"access": "public",
"description": null,
"lineNumber": 106,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 80,
"kind": "class",
"name": "GetTransactionsException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~GetTransactionsException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{GetTransactionsException}",
"description": "Thrown when the server returns an error when querying transactions",
"lineNumber": 113,
"interface": false,
"extends": [
"GetRequestException"
]
},
{
"__docId__": 81,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~GetTransactionsException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~GetTransactionsException#constructor",
"access": "public",
"description": null,
"lineNumber": 114,
"undocument": true
},
{
"__docId__": 82,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~GetTransactionsException",
"static": false,
"longname": "src/exceptions.js~GetTransactionsException#name",
"access": "public",
"description": null,
"lineNumber": 116,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 83,
"kind": "class",
"name": "TransactionStatusCheckException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~TransactionStatusCheckException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{TransactionStatusCheckException}",
"description": "Thrown when an error occurs checking a transactions status",
"lineNumber": 123,
"interface": false,
"extends": [
"BaseException"
]
},
{
"__docId__": 84,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~TransactionStatusCheckException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~TransactionStatusCheckException#constructor",
"access": "public",
"description": null,
"lineNumber": 124,
"undocument": true
},
{
"__docId__": 85,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~TransactionStatusCheckException",
"static": false,
"longname": "src/exceptions.js~TransactionStatusCheckException#name",
"access": "public",
"description": null,
"lineNumber": 126,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 86,
"kind": "class",
"name": "SigningException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~SigningException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{SigningException}",
"description": "Thrown when there's an error signing a transaction",
"lineNumber": 133,
"interface": false,
"extends": [
"BaseException"
]
},
{
"__docId__": 87,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~SigningException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~SigningException#constructor",
"access": "public",
"description": null,
"lineNumber": 134,
"undocument": true
},
{
"__docId__": 88,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~SigningException",
"static": false,
"longname": "src/exceptions.js~SigningException#name",
"access": "public",
"description": null,
"lineNumber": 136,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 89,
"kind": "class",
"name": "NotInBrowserException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~NotInBrowserException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{NotInBrowserException}",
"description": "Thrown when a LocalWallet is created in a non browser environment",
"lineNumber": 143,
"interface": false,
"extends": [
"BaseException"
]
},
{
"__docId__": 90,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~NotInBrowserException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~NotInBrowserException#constructor",
"access": "public",
"description": null,
"lineNumber": 144,
"undocument": true
},
{
"__docId__": 91,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~NotInBrowserException",
"static": false,
"longname": "src/exceptions.js~NotInBrowserException#name",
"access": "public",
"description": null,
"lineNumber": 146,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 92,
"kind": "class",
"name": "UserRejectedSigningException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~UserRejectedSigningException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{UserRejectedSigningException}",
"description": "Thrown when the user rejects the request to sign",
"lineNumber": 153,
"interface": false,
"extends": [
"SigningException"
]
},
{
"__docId__": 93,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~UserRejectedSigningException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~UserRejectedSigningException#constructor",
"access": "public",
"description": null,
"lineNumber": 154,
"undocument": true
},
{
"__docId__": 94,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~UserRejectedSigningException",
"static": false,
"longname": "src/exceptions.js~UserRejectedSigningException#name",
"access": "public",
"description": null,
"lineNumber": 156,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 95,
"kind": "class",
"name": "WalletNotFoundException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~WalletNotFoundException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{WalletNotFoundException}",
"description": "Thrown when a method on a class inheriting [SimbaBase]{@link SimbaBase} is called that requires\na [Wallet]{@link Wallet} to be set, and it isn't.",
"lineNumber": 164,
"interface": false,
"extends": [
"SigningException"
]
},
{
"__docId__": 96,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~WalletNotFoundException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~WalletNotFoundException#constructor",
"access": "public",
"description": null,
"lineNumber": 165,
"undocument": true
},
{
"__docId__": 97,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~WalletNotFoundException",
"static": false,
"longname": "src/exceptions.js~WalletNotFoundException#name",
"access": "public",
"description": null,
"lineNumber": 167,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 98,
"kind": "class",
"name": "WalletLockedException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~WalletLockedException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{WalletLockedException}",
"description": "Thrown when a method on a class inheriting [SimbaBase]{@link SimbaBase} is called that requires\na [Wallet]{@link Wallet} to be unlocked, and it isn't.",
"lineNumber": 175,
"interface": false,
"extends": [
"SigningException"
]
},
{
"__docId__": 99,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~WalletLockedException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~WalletLockedException#constructor",
"access": "public",
"description": null,
"lineNumber": 176,
"undocument": true
},
{
"__docId__": 100,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~WalletLockedException",
"static": false,
"longname": "src/exceptions.js~WalletLockedException#name",
"access": "public",
"description": null,
"lineNumber": 178,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 101,
"kind": "class",
"name": "RetriesExceededException",
"memberof": "src/exceptions.js",
"static": true,
"longname": "src/exceptions.js~RetriesExceededException",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/exceptions.js",
"importStyle": "{RetriesExceededException}",
"description": "Thrown when a method call exceeds the max retries",
"lineNumber": 185,
"interface": false,
"extends": [
"SigningException"
]
},
{
"__docId__": 102,
"kind": "constructor",
"name": "constructor",
"memberof": "src/exceptions.js~RetriesExceededException",
"generator": false,
"async": false,
"static": false,
"longname": "src/exceptions.js~RetriesExceededException#constructor",
"access": "public",
"description": null,
"lineNumber": 186,
"undocument": true
},
{
"__docId__": 103,
"kind": "member",
"name": "name",
"memberof": "src/exceptions.js~RetriesExceededException",
"static": false,
"longname": "src/exceptions.js~RetriesExceededException#name",
"access": "public",
"description": null,
"lineNumber": 188,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 104,
"kind": "file",
"name": "src/index.js",
"content": "import {SimbaBase, Simbachain} from './simba';\r\nimport {Wallet, LocalWallet, PKWallet} from './wallet';\r\nimport {NotImplementedException} from './exceptions';\r\n\r\n/**\r\n * Create an instance of a Simbachain API interaction class\r\n * Automatically takes care of choosing the correct implementation and running asynchronous initialisation.\r\n * @param {string} url - The API URL\r\n * @param {Wallet} wallet - The Wallet to use\r\n * @param {string} [apiKey] - (Optional) The API key\r\n * @param {string} [managementKey] - (Optional) The Management API key\r\n * @returns {Promise<Simbachain>} - An initialised instance of the API interaction class\r\n */\r\nconst getSimbaInstance = async (url, wallet, apiKey, managementKey) => {\r\n if(url.startsWith('https://api.simbachain.com')){\r\n //.com\r\n let simba = new Simbachain(url, wallet);\r\n\r\n if(apiKey){\r\n simba.setApiKey(apiKey)\r\n }\r\n\r\n if(managementKey){\r\n simba.setManagementKey(managementKey)\r\n }\r\n\r\n await simba.initialize();\r\n\r\n return simba;\r\n }else{\r\n //scaas\r\n throw new NotImplementedException(\"SCaaS Support not yet implemented, sorry.\")\r\n }\r\n};\r\n\r\nexport {\r\n SimbaBase,\r\n Simbachain,\r\n Wallet,\r\n LocalWallet,\r\n PKWallet,\r\n getSimbaInstance\r\n}\r\n",
"static": true,
"longname": "C:/Users/keyz/Code/libsimba-js/src/index.js",
"access": "public",
"description": null,
"lineNumber": 1
},
{
"__docId__": 105,
"kind": "function",
"name": "getSimbaInstance",
"memberof": "src/index.js",
"generator": false,
"async": true,
"static": true,
"longname": "src/index.js~getSimbaInstance",
"access": "public",
"export": true,
"importPath": "@simbachain/libsimba-js/src/index.js",
"importStyle": "{getSimbaInstance}",
"description": "Create an instance of a Simbachain API interaction class\nAutomatically takes care of choosing the correct implementation and running asynchronous initialisation.",
"lineNumber": 14,
"unknown": [
{
"tagName": "@returns",
"tagValue": "{Promise<Simbachain>} - An initialised instance of the API interaction class"
}
],
"params": [
{
"nullable": null,
"types": [