@ellipticltd/aml-utils 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="WEB_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <excludeFolder url="file://$MODULE_DIR$/temp" />
6
+ <excludeFolder url="file://$MODULE_DIR$/.tmp" />
7
+ <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
+ </content>
9
+ <orderEntry type="inheritedJdk" />
10
+ <orderEntry type="sourceFolder" forTests="false" />
11
+ </component>
12
+ </module>
@@ -0,0 +1,94 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <code_scheme name="Project" version="173">
3
+ <option name="SOFT_MARGINS" value="80" />
4
+ <DBN-PSQL>
5
+ <case-options enabled="false">
6
+ <option name="KEYWORD_CASE" value="lower" />
7
+ <option name="FUNCTION_CASE" value="lower" />
8
+ <option name="PARAMETER_CASE" value="lower" />
9
+ <option name="DATATYPE_CASE" value="lower" />
10
+ <option name="OBJECT_CASE" value="preserve" />
11
+ </case-options>
12
+ <formatting-settings enabled="false" />
13
+ </DBN-PSQL>
14
+ <DBN-SQL>
15
+ <case-options enabled="false">
16
+ <option name="KEYWORD_CASE" value="lower" />
17
+ <option name="FUNCTION_CASE" value="lower" />
18
+ <option name="PARAMETER_CASE" value="lower" />
19
+ <option name="DATATYPE_CASE" value="lower" />
20
+ <option name="OBJECT_CASE" value="preserve" />
21
+ </case-options>
22
+ <formatting-settings enabled="false">
23
+ <option name="STATEMENT_SPACING" value="one_line" />
24
+ <option name="CLAUSE_CHOP_DOWN" value="chop_down_if_statement_long" />
25
+ <option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
26
+ </formatting-settings>
27
+ </DBN-SQL>
28
+ <HTMLCodeStyleSettings>
29
+ <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
30
+ <option name="HTML_DO_NOT_INDENT_CHILDREN_OF" value="html,body" />
31
+ </HTMLCodeStyleSettings>
32
+ <JSCodeStyleSettings version="0">
33
+ <option name="FORCE_SEMICOLON_STYLE" value="true" />
34
+ <option name="USE_DOUBLE_QUOTES" value="false" />
35
+ <option name="FORCE_QUOTE_STYlE" value="true" />
36
+ <option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
37
+ <option name="JSX_ATTRIBUTE_VALUE" value="Based on type" />
38
+ <option name="VAR_DECLARATION_WRAP" value="2" />
39
+ <option name="OBJECT_LITERAL_WRAP" value="2" />
40
+ <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
41
+ <option name="SPACES_WITHIN_IMPORTS" value="true" />
42
+ <option name="IMPORT_SORT_MODULE_NAME" value="true" />
43
+ </JSCodeStyleSettings>
44
+ <MarkdownNavigatorCodeStyleSettings>
45
+ <option name="RIGHT_MARGIN" value="72" />
46
+ </MarkdownNavigatorCodeStyleSettings>
47
+ <PostgresCodeStyleSettings version="2">
48
+ <option name="KEYWORD_CASE" value="0" />
49
+ </PostgresCodeStyleSettings>
50
+ <SqlCodeStyleSettings version="2">
51
+ <option name="KEYWORD_CASE" value="0" />
52
+ </SqlCodeStyleSettings>
53
+ <TypeScriptCodeStyleSettings version="0">
54
+ <option name="FORCE_SEMICOLON_STYLE" value="true" />
55
+ <option name="USE_DOUBLE_QUOTES" value="false" />
56
+ <option name="FORCE_QUOTE_STYlE" value="true" />
57
+ <option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
58
+ <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
59
+ <option name="SPACES_WITHIN_IMPORTS" value="true" />
60
+ </TypeScriptCodeStyleSettings>
61
+ <codeStyleSettings language="JSON">
62
+ <indentOptions>
63
+ <option name="INDENT_SIZE" value="4" />
64
+ </indentOptions>
65
+ </codeStyleSettings>
66
+ <codeStyleSettings language="JavaScript">
67
+ <option name="RIGHT_MARGIN" value="100" />
68
+ <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
69
+ <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
70
+ <option name="ALIGN_MULTILINE_FOR" value="false" />
71
+ <option name="METHOD_PARAMETERS_WRAP" value="1" />
72
+ <option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
73
+ <option name="METHOD_CALL_CHAIN_WRAP" value="2" />
74
+ <option name="IF_BRACE_FORCE" value="1" />
75
+ <option name="DOWHILE_BRACE_FORCE" value="1" />
76
+ <option name="WHILE_BRACE_FORCE" value="1" />
77
+ <option name="FOR_BRACE_FORCE" value="1" />
78
+ <indentOptions>
79
+ <option name="INDENT_SIZE" value="2" />
80
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
81
+ <option name="TAB_SIZE" value="2" />
82
+ </indentOptions>
83
+ </codeStyleSettings>
84
+ <codeStyleSettings language="TypeScript">
85
+ <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
86
+ <option name="METHOD_PARAMETERS_WRAP" value="1" />
87
+ <indentOptions>
88
+ <option name="INDENT_SIZE" value="2" />
89
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
90
+ <option name="TAB_SIZE" value="2" />
91
+ </indentOptions>
92
+ </codeStyleSettings>
93
+ </code_scheme>
94
+ </component>
@@ -0,0 +1,5 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <state>
3
+ <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
+ </state>
5
+ </component>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
+ </profile>
6
+ </component>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/aml-utils.iml" filepath="$PROJECT_DIR$/.idea/aml-utils.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
package/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -122,6 +122,12 @@ export namespace algorand {
122
122
  function isTxHash(str: any): boolean;
123
123
  function isTxHash(str: any): boolean;
124
124
  }
125
+ export namespace tezos {
126
+ function isAddress(str: any): any;
127
+ function isAddress(str: any): any;
128
+ function isTxHash(str: any): boolean;
129
+ function isTxHash(str: any): boolean;
130
+ }
125
131
  export namespace polkadot {
126
132
  function isAddress(str: any): any;
127
133
  function isAddress(str: any): any;
@@ -299,6 +299,14 @@ const validations = {
299
299
  return str.length === 52;
300
300
  },
301
301
  },
302
+ tezos: {
303
+ isAddress(str) {
304
+ return addressValidator.validate(str, 'xtz');
305
+ },
306
+ isTxHash(str) {
307
+ return str.length === 51;
308
+ },
309
+ },
302
310
  polkadot: {
303
311
  isAddress(str) {
304
312
  return addressValidator.validate(str, 'dot');
@@ -304,6 +304,14 @@ const validations = {
304
304
  return str.length === 52;
305
305
  },
306
306
  },
307
+ tezos: {
308
+ isAddress(str) {
309
+ return addressValidator.validate(str, 'xtz');
310
+ },
311
+ isTxHash(str) {
312
+ return str.length === 51;
313
+ },
314
+ },
307
315
  polkadot: {
308
316
  isAddress(str) {
309
317
  return addressValidator.validate(str, 'dot');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ellipticltd/aml-utils",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Utilities, helpers, validations, type-checking, etc",
5
5
  "engines": {
6
6
  "node": "10.1.0",