소스 검색

hopefully fix websockets closing from over-use

master
nitowa 2 년 전
부모
커밋
2674141716
6개의 변경된 파일249개의 추가작업 그리고 147개의 파일을 삭제
  1. 181
    125
      package-lock.json
  2. 2
    2
      package.json
  3. 45
    15
      src/xrpIO/ripple-binding.ts
  4. 4
    0
      test/CONSTANTS.ts
  5. 1
    0
      test/index.html
  6. 16
    5
      test/primitives.ts

+ 181
- 125
package-lock.json 파일 보기

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "xrpio",
3
-  "version": "0.0.2",
3
+  "version": "0.0.4",
4 4
   "lockfileVersion": 1,
5 5
   "requires": true,
6 6
   "dependencies": {
@@ -11,9 +11,9 @@
11 11
       "dev": true
12 12
     },
13 13
     "@types/lodash": {
14
-      "version": "4.14.168",
15
-      "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.168.tgz",
16
-      "integrity": "sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q=="
14
+      "version": "4.14.178",
15
+      "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.178.tgz",
16
+      "integrity": "sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw=="
17 17
     },
18 18
     "@types/mocha": {
19 19
       "version": "8.2.2",
@@ -27,9 +27,9 @@
27 27
       "integrity": "sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw=="
28 28
     },
29 29
     "@types/ws": {
30
-      "version": "7.4.1",
31
-      "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.1.tgz",
32
-      "integrity": "sha512-ISCK1iFnR+jYv7+jLNX0wDqesZ/5RAeY3wUx6QaphmocphU61h+b+PHjS18TF4WIPTu/MMzxIq2PHr32o2TS5Q==",
30
+      "version": "7.4.7",
31
+      "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz",
32
+      "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==",
33 33
       "requires": {
34 34
         "@types/node": "*"
35 35
       }
@@ -85,11 +85,6 @@
85 85
       "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
86 86
       "dev": true
87 87
     },
88
-    "array-filter": {
89
-      "version": "1.0.0",
90
-      "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz",
91
-      "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM="
92
-    },
93 88
     "asn1.js": {
94 89
       "version": "5.4.1",
95 90
       "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz",
@@ -128,12 +123,9 @@
128 123
       "dev": true
129 124
     },
130 125
     "available-typed-arrays": {
131
-      "version": "1.0.2",
132
-      "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz",
133
-      "integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==",
134
-      "requires": {
135
-        "array-filter": "^1.0.0"
136
-      }
126
+      "version": "1.0.5",
127
+      "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
128
+      "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw=="
137 129
     },
138 130
     "balanced-match": {
139 131
       "version": "1.0.0",
@@ -148,9 +140,9 @@
148 140
       "dev": true
149 141
     },
150 142
     "base-x": {
151
-      "version": "3.0.8",
152
-      "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz",
153
-      "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==",
143
+      "version": "3.0.9",
144
+      "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz",
145
+      "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==",
154 146
       "requires": {
155 147
         "safe-buffer": "^5.0.1"
156 148
       }
@@ -161,9 +153,9 @@
161 153
       "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
162 154
     },
163 155
     "big-integer": {
164
-      "version": "1.6.48",
165
-      "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz",
166
-      "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w=="
156
+      "version": "1.6.51",
157
+      "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz",
158
+      "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg=="
167 159
     },
168 160
     "big.js": {
169 161
       "version": "5.2.2",
@@ -172,9 +164,9 @@
172 164
       "dev": true
173 165
     },
174 166
     "bignumber.js": {
175
-      "version": "9.0.1",
176
-      "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz",
177
-      "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA=="
167
+      "version": "9.0.2",
168
+      "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz",
169
+      "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw=="
178 170
     },
179 171
     "binary-extensions": {
180 172
       "version": "2.2.0",
@@ -485,9 +477,9 @@
485 477
       }
486 478
     },
487 479
     "debug": {
488
-      "version": "4.3.1",
489
-      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
490
-      "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
480
+      "version": "4.3.3",
481
+      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
482
+      "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
491 483
       "requires": {
492 484
         "ms": "2.1.2"
493 485
       }
@@ -499,9 +491,9 @@
499 491
       "dev": true
500 492
     },
501 493
     "decimal.js": {
502
-      "version": "10.2.1",
503
-      "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.1.tgz",
504
-      "integrity": "sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw=="
494
+      "version": "10.3.1",
495
+      "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz",
496
+      "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ=="
505 497
     },
506 498
     "deep-eql": {
507 499
       "version": "3.0.1",
@@ -598,26 +590,30 @@
598 590
       }
599 591
     },
600 592
     "es-abstract": {
601
-      "version": "1.18.0",
602
-      "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz",
603
-      "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==",
593
+      "version": "1.19.1",
594
+      "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz",
595
+      "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==",
604 596
       "requires": {
605 597
         "call-bind": "^1.0.2",
606 598
         "es-to-primitive": "^1.2.1",
607 599
         "function-bind": "^1.1.1",
608 600
         "get-intrinsic": "^1.1.1",
601
+        "get-symbol-description": "^1.0.0",
609 602
         "has": "^1.0.3",
610 603
         "has-symbols": "^1.0.2",
611
-        "is-callable": "^1.2.3",
604
+        "internal-slot": "^1.0.3",
605
+        "is-callable": "^1.2.4",
612 606
         "is-negative-zero": "^2.0.1",
613
-        "is-regex": "^1.1.2",
614
-        "is-string": "^1.0.5",
615
-        "object-inspect": "^1.9.0",
607
+        "is-regex": "^1.1.4",
608
+        "is-shared-array-buffer": "^1.0.1",
609
+        "is-string": "^1.0.7",
610
+        "is-weakref": "^1.0.1",
611
+        "object-inspect": "^1.11.0",
616 612
         "object-keys": "^1.1.1",
617 613
         "object.assign": "^4.1.2",
618 614
         "string.prototype.trimend": "^1.0.4",
619 615
         "string.prototype.trimstart": "^1.0.4",
620
-        "unbox-primitive": "^1.0.0"
616
+        "unbox-primitive": "^1.0.1"
621 617
       }
622 618
     },
623 619
     "es-to-primitive": {
@@ -727,6 +723,15 @@
727 723
         "has-symbols": "^1.0.1"
728 724
       }
729 725
     },
726
+    "get-symbol-description": {
727
+      "version": "1.0.0",
728
+      "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz",
729
+      "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==",
730
+      "requires": {
731
+        "call-bind": "^1.0.2",
732
+        "get-intrinsic": "^1.1.1"
733
+      }
734
+    },
730 735
     "glob": {
731 736
       "version": "7.2.0",
732 737
       "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
@@ -799,6 +804,14 @@
799 804
       "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
800 805
       "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw=="
801 806
     },
807
+    "has-tostringtag": {
808
+      "version": "1.0.0",
809
+      "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
810
+      "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
811
+      "requires": {
812
+        "has-symbols": "^1.0.2"
813
+      }
814
+    },
802 815
     "hash-base": {
803 816
       "version": "3.1.0",
804 817
       "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz",
@@ -863,18 +876,32 @@
863 876
       "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
864 877
       "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
865 878
     },
879
+    "internal-slot": {
880
+      "version": "1.0.3",
881
+      "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz",
882
+      "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==",
883
+      "requires": {
884
+        "get-intrinsic": "^1.1.0",
885
+        "has": "^1.0.3",
886
+        "side-channel": "^1.0.4"
887
+      }
888
+    },
866 889
     "is-arguments": {
867
-      "version": "1.1.0",
868
-      "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz",
869
-      "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==",
890
+      "version": "1.1.1",
891
+      "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
892
+      "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==",
870 893
       "requires": {
871
-        "call-bind": "^1.0.0"
894
+        "call-bind": "^1.0.2",
895
+        "has-tostringtag": "^1.0.0"
872 896
       }
873 897
     },
874 898
     "is-bigint": {
875
-      "version": "1.0.1",
876
-      "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz",
877
-      "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg=="
899
+      "version": "1.0.4",
900
+      "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
901
+      "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==",
902
+      "requires": {
903
+        "has-bigints": "^1.0.1"
904
+      }
878 905
     },
879 906
     "is-binary-path": {
880 907
       "version": "2.1.0",
@@ -886,22 +913,26 @@
886 913
       }
887 914
     },
888 915
     "is-boolean-object": {
889
-      "version": "1.1.0",
890
-      "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz",
891
-      "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==",
916
+      "version": "1.1.2",
917
+      "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
918
+      "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==",
892 919
       "requires": {
893
-        "call-bind": "^1.0.0"
920
+        "call-bind": "^1.0.2",
921
+        "has-tostringtag": "^1.0.0"
894 922
       }
895 923
     },
896 924
     "is-callable": {
897
-      "version": "1.2.3",
898
-      "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz",
899
-      "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ=="
925
+      "version": "1.2.4",
926
+      "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz",
927
+      "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w=="
900 928
     },
901 929
     "is-date-object": {
902
-      "version": "1.0.2",
903
-      "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
904
-      "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g=="
930
+      "version": "1.0.5",
931
+      "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz",
932
+      "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
933
+      "requires": {
934
+        "has-tostringtag": "^1.0.0"
935
+      }
905 936
     },
906 937
     "is-extglob": {
907 938
       "version": "2.1.1",
@@ -916,9 +947,12 @@
916 947
       "dev": true
917 948
     },
918 949
     "is-generator-function": {
919
-      "version": "1.0.8",
920
-      "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.8.tgz",
921
-      "integrity": "sha512-2Omr/twNtufVZFr1GhxjOMFPAj2sjc/dKaIqBhvo4qciXfJmITGH6ZGd8eZYNHza8t1y0e01AuqRhJwfWp26WQ=="
950
+      "version": "1.0.10",
951
+      "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz",
952
+      "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==",
953
+      "requires": {
954
+        "has-tostringtag": "^1.0.0"
955
+      }
922 956
     },
923 957
     "is-glob": {
924 958
       "version": "4.0.3",
@@ -939,9 +973,9 @@
939 973
       }
940 974
     },
941 975
     "is-negative-zero": {
942
-      "version": "2.0.1",
943
-      "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz",
944
-      "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w=="
976
+      "version": "2.0.2",
977
+      "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz",
978
+      "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA=="
945 979
     },
946 980
     "is-number": {
947 981
       "version": "7.0.0",
@@ -950,9 +984,12 @@
950 984
       "dev": true
951 985
     },
952 986
     "is-number-object": {
953
-      "version": "1.0.4",
954
-      "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz",
955
-      "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw=="
987
+      "version": "1.0.6",
988
+      "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz",
989
+      "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==",
990
+      "requires": {
991
+        "has-tostringtag": "^1.0.0"
992
+      }
956 993
     },
957 994
     "is-plain-obj": {
958 995
       "version": "2.1.0",
@@ -961,37 +998,45 @@
961 998
       "dev": true
962 999
     },
963 1000
     "is-regex": {
964
-      "version": "1.1.2",
965
-      "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz",
966
-      "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==",
1001
+      "version": "1.1.4",
1002
+      "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
1003
+      "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
967 1004
       "requires": {
968 1005
         "call-bind": "^1.0.2",
969
-        "has-symbols": "^1.0.1"
1006
+        "has-tostringtag": "^1.0.0"
970 1007
       }
971 1008
     },
1009
+    "is-shared-array-buffer": {
1010
+      "version": "1.0.1",
1011
+      "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz",
1012
+      "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA=="
1013
+    },
972 1014
     "is-string": {
973
-      "version": "1.0.5",
974
-      "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz",
975
-      "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ=="
1015
+      "version": "1.0.7",
1016
+      "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz",
1017
+      "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==",
1018
+      "requires": {
1019
+        "has-tostringtag": "^1.0.0"
1020
+      }
976 1021
     },
977 1022
     "is-symbol": {
978
-      "version": "1.0.3",
979
-      "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
980
-      "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
1023
+      "version": "1.0.4",
1024
+      "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
1025
+      "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==",
981 1026
       "requires": {
982
-        "has-symbols": "^1.0.1"
1027
+        "has-symbols": "^1.0.2"
983 1028
       }
984 1029
     },
985 1030
     "is-typed-array": {
986
-      "version": "1.1.5",
987
-      "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.5.tgz",
988
-      "integrity": "sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug==",
1031
+      "version": "1.1.8",
1032
+      "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.8.tgz",
1033
+      "integrity": "sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA==",
989 1034
       "requires": {
990
-        "available-typed-arrays": "^1.0.2",
1035
+        "available-typed-arrays": "^1.0.5",
991 1036
         "call-bind": "^1.0.2",
992
-        "es-abstract": "^1.18.0-next.2",
1037
+        "es-abstract": "^1.18.5",
993 1038
         "foreach": "^2.0.5",
994
-        "has-symbols": "^1.0.1"
1039
+        "has-tostringtag": "^1.0.0"
995 1040
       }
996 1041
     },
997 1042
     "is-unicode-supported": {
@@ -1000,6 +1045,14 @@
1000 1045
       "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",
1001 1046
       "dev": true
1002 1047
     },
1048
+    "is-weakref": {
1049
+      "version": "1.0.2",
1050
+      "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz",
1051
+      "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==",
1052
+      "requires": {
1053
+        "call-bind": "^1.0.2"
1054
+      }
1055
+    },
1003 1056
     "isarray": {
1004 1057
       "version": "1.0.0",
1005 1058
       "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
@@ -1066,11 +1119,6 @@
1066 1119
       "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
1067 1120
       "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
1068 1121
     },
1069
-    "lodash.isequal": {
1070
-      "version": "4.5.0",
1071
-      "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
1072
-      "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
1073
-    },
1074 1122
     "log-symbols": {
1075 1123
       "version": "4.1.0",
1076 1124
       "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",
@@ -1306,9 +1354,9 @@
1306 1354
       "dev": true
1307 1355
     },
1308 1356
     "object-inspect": {
1309
-      "version": "1.9.0",
1310
-      "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz",
1311
-      "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw=="
1357
+      "version": "1.12.0",
1358
+      "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz",
1359
+      "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g=="
1312 1360
     },
1313 1361
     "object-is": {
1314 1362
       "version": "1.1.5",
@@ -1506,43 +1554,43 @@
1506 1554
       }
1507 1555
     },
1508 1556
     "ripple-address-codec": {
1509
-      "version": "4.1.2",
1510
-      "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.1.2.tgz",
1511
-      "integrity": "sha512-bIhmaxOg6rwVYkPQha9cuHdIdwmD8XTnaklBmyRjFvNZwYJ6Cf0cdCt+SpJd+RRJhRU65+U1Eup6YkoCBrqebg==",
1557
+      "version": "4.2.3",
1558
+      "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.2.3.tgz",
1559
+      "integrity": "sha512-9Nd0hQmKoJEhSTzYR9kYjKmSWlH6HaVosNVAM7mIIVlzcNlQCPfKXj7CfvXcRiHl3C6XUZj7RFLqzVaPjq2ufA==",
1512 1560
       "requires": {
1513
-        "base-x": "3.0.8",
1561
+        "base-x": "3.0.9",
1514 1562
         "create-hash": "^1.1.2"
1515 1563
       }
1516 1564
     },
1517 1565
     "ripple-binary-codec": {
1518
-      "version": "1.1.2",
1519
-      "resolved": "https://registry.npmjs.org/ripple-binary-codec/-/ripple-binary-codec-1.1.2.tgz",
1520
-      "integrity": "sha512-BrsBkNic0F2++zEnCmWlHZEBNmMUJMN9xL2HL5I2fpmo0qlv+6g9oT7HrkxY3HCui52PJuKnkkrwBjqWvPBqpg==",
1566
+      "version": "1.3.2",
1567
+      "resolved": "https://registry.npmjs.org/ripple-binary-codec/-/ripple-binary-codec-1.3.2.tgz",
1568
+      "integrity": "sha512-8VG1vfb3EM1J7ZdPXo9E57Zv2hF4cxT64gP6rGSQzODVgMjiBCWozhN3729qNTGtHItz0e82Oix8v95vWYBQ3A==",
1521 1569
       "requires": {
1522 1570
         "assert": "^2.0.0",
1523 1571
         "big-integer": "^1.6.48",
1524 1572
         "buffer": "5.6.0",
1525 1573
         "create-hash": "^1.2.0",
1526 1574
         "decimal.js": "^10.2.0",
1527
-        "ripple-address-codec": "^4.1.1"
1575
+        "ripple-address-codec": "^4.2.3"
1528 1576
       }
1529 1577
     },
1530 1578
     "ripple-keypairs": {
1531
-      "version": "1.0.3",
1532
-      "resolved": "https://registry.npmjs.org/ripple-keypairs/-/ripple-keypairs-1.0.3.tgz",
1533
-      "integrity": "sha512-Na5q8sUdxjd5DXBM88ocJgL2Ig0I1USyO3bvI0SMxJPp7F9DHvqLdPX45PVXs7HUq0Dj691Z9Uz9NeD/K7/eOA==",
1579
+      "version": "1.1.3",
1580
+      "resolved": "https://registry.npmjs.org/ripple-keypairs/-/ripple-keypairs-1.1.3.tgz",
1581
+      "integrity": "sha512-y74Y3c0g652BgpDhWsf0x98GnUyY2D9eO2ay2exienUfbIe00TeIiFhYXQhCGVnliGsxeV9WTpU+YuEWuIxuhw==",
1534 1582
       "requires": {
1535 1583
         "bn.js": "^5.1.1",
1536 1584
         "brorand": "^1.0.5",
1537
-        "elliptic": "^6.5.2",
1585
+        "elliptic": "^6.5.4",
1538 1586
         "hash.js": "^1.0.3",
1539
-        "ripple-address-codec": "^4.0.0"
1587
+        "ripple-address-codec": "^4.2.3"
1540 1588
       }
1541 1589
     },
1542 1590
     "ripple-lib": {
1543
-      "version": "1.9.3",
1544
-      "resolved": "https://registry.npmjs.org/ripple-lib/-/ripple-lib-1.9.3.tgz",
1545
-      "integrity": "sha512-AUYK6uqt661EbQe/28QAl8v4WwWDU32alDSRU+GVxPQbngjmv70G1oUOPvCwSgWOexHqL9PR72b9GgMdLVSt1w==",
1591
+      "version": "1.10.0",
1592
+      "resolved": "https://registry.npmjs.org/ripple-lib/-/ripple-lib-1.10.0.tgz",
1593
+      "integrity": "sha512-Cg2u73UybfM1PnzcuLt5flvLKZn35ovdIp+1eLrReVB4swuRuUF/SskJG9hf5wMosbvh+E+jZu8A6IbYJoyFIA==",
1546 1594
       "requires": {
1547 1595
         "@types/lodash": "^4.14.136",
1548 1596
         "@types/ws": "^7.2.0",
@@ -1550,9 +1598,8 @@
1550 1598
         "https-proxy-agent": "^5.0.0",
1551 1599
         "jsonschema": "1.2.2",
1552 1600
         "lodash": "^4.17.4",
1553
-        "lodash.isequal": "^4.5.0",
1554 1601
         "ripple-address-codec": "^4.1.1",
1555
-        "ripple-binary-codec": "^1.1.2",
1602
+        "ripple-binary-codec": "^1.1.3",
1556 1603
         "ripple-keypairs": "^1.0.3",
1557 1604
         "ripple-lib-transactionparser": "0.8.2",
1558 1605
         "ws": "^7.2.0"
@@ -1616,6 +1663,16 @@
1616 1663
         "vscode-textmate": "5.2.0"
1617 1664
       }
1618 1665
     },
1666
+    "side-channel": {
1667
+      "version": "1.0.4",
1668
+      "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
1669
+      "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
1670
+      "requires": {
1671
+        "call-bind": "^1.0.0",
1672
+        "get-intrinsic": "^1.0.2",
1673
+        "object-inspect": "^1.9.0"
1674
+      }
1675
+    },
1619 1676
     "source-map": {
1620 1677
       "version": "0.6.1",
1621 1678
       "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@@ -1805,9 +1862,9 @@
1805 1862
       "dev": true
1806 1863
     },
1807 1864
     "util": {
1808
-      "version": "0.12.3",
1809
-      "resolved": "https://registry.npmjs.org/util/-/util-0.12.3.tgz",
1810
-      "integrity": "sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==",
1865
+      "version": "0.12.4",
1866
+      "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz",
1867
+      "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==",
1811 1868
       "requires": {
1812 1869
         "inherits": "^2.0.3",
1813 1870
         "is-arguments": "^1.0.4",
@@ -1872,17 +1929,16 @@
1872 1929
       }
1873 1930
     },
1874 1931
     "which-typed-array": {
1875
-      "version": "1.1.4",
1876
-      "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz",
1877
-      "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==",
1932
+      "version": "1.1.7",
1933
+      "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.7.tgz",
1934
+      "integrity": "sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw==",
1878 1935
       "requires": {
1879
-        "available-typed-arrays": "^1.0.2",
1880
-        "call-bind": "^1.0.0",
1881
-        "es-abstract": "^1.18.0-next.1",
1936
+        "available-typed-arrays": "^1.0.5",
1937
+        "call-bind": "^1.0.2",
1938
+        "es-abstract": "^1.18.5",
1882 1939
         "foreach": "^2.0.5",
1883
-        "function-bind": "^1.1.1",
1884
-        "has-symbols": "^1.0.1",
1885
-        "is-typed-array": "^1.1.3"
1940
+        "has-tostringtag": "^1.0.0",
1941
+        "is-typed-array": "^1.1.7"
1886 1942
       }
1887 1943
     },
1888 1944
     "wordwrap": {
@@ -1915,9 +1971,9 @@
1915 1971
       "dev": true
1916 1972
     },
1917 1973
     "ws": {
1918
-      "version": "7.5.6",
1919
-      "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz",
1920
-      "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA=="
1974
+      "version": "7.5.7",
1975
+      "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz",
1976
+      "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A=="
1921 1977
     },
1922 1978
     "y18n": {
1923 1979
       "version": "5.0.8",

+ 2
- 2
package.json 파일 보기

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "xrpio",
3
-  "version": "0.0.4",
3
+  "version": "0.0.5",
4 4
   "repository": {
5 5
     "type": "git",
6 6
     "url": "https://gitea.nitowa.xyz/npm-packages/xrpio.git"
@@ -28,7 +28,7 @@
28 28
   "author": "nitowa",
29 29
   "license": "MIT",
30 30
   "dependencies": {
31
-    "ripple-lib": "^1.9.3"
31
+    "ripple-lib": "^1.10.0"
32 32
   },
33 33
   "devDependencies": {
34 34
     "@types/chai": "^4.2.21",

+ 45
- 15
src/xrpIO/ripple-binding.ts 파일 보기

@@ -12,9 +12,16 @@ const PAYLOAD_SIZE = 925
12 12
 const debug = false
13 13
 
14 14
 const cloneApi = async (api: RippleAPI): Promise<RippleAPI> => {
15
-  const subApi = new RippleAPI({ server: api.connection['_url'] })
16
-  await subApi.connect()
17
-  return subApi
15
+  try{
16
+    const subApi = new RippleAPI({ server: api.connection['_url'] })
17
+    await subApi.connect()
18
+    return subApi
19
+  }catch(e){
20
+    if(debug){
21
+      console.log("CLONEAPI ERR", e)
22
+    }
23
+    return await cloneApi(api)
24
+  }
18 25
 }
19 26
 
20 27
 export const getLatestSequence = async (api: RippleAPI, accountAddress: string): Promise<number> => {
@@ -31,7 +38,7 @@ const sendReliably = (api: RippleAPI, signed: any, preparedPayment,): Promise<an
31 38
     let status
32 39
     try {
33 40
       status = await api.getTransaction(signed.id, {
34
-        minLedgerVersion: 20368096
41
+        minLedgerVersion: 25235454
35 42
       })
36 43
     } catch (e) {
37 44
       
@@ -85,23 +92,26 @@ export const sendPayment = async (api: RippleAPI, data: Memo[], from: string, to
85 92
     },
86 93
     memos: data,
87 94
   };
95
+
96
+  const _api = await cloneApi(api)
88 97
   try {
89
-    const _api = await cloneApi(api)
90 98
     const prepared = await _api.preparePayment(from, payment, options)
91 99
     const signed = _api.sign(prepared.txJSON, secret);
92 100
     const txHash = await _api.submit(signed.signedTransaction)
93
-    if(debug) console.log("Transaction submitted", txHash)
101
+    //if(debug) console.log("Transaction submitted", txHash)
94 102
     await sendReliably(_api, signed, prepared)
95
-    _api.disconnect()
96 103
 
97 104
     return txHash
98 105
   } catch (error) {
99
-    //console.log("SENDPAYMENT ERROR", error)
106
+    if(debug)
107
+      console.log("SENDPAYMENT ERROR", error)
100 108
     throw error
109
+  }finally{
110
+    _api.disconnect()
101 111
   }
102 112
 }
103 113
 
104
-export const getTransactions = async (api: RippleAPI, address: string, minLedgerVersion: number = 19832467): Promise<any[]> => {
114
+export const getTransactions = async (api: RippleAPI, address: string, minLedgerVersion: number = 25235454): Promise<any[]> => {
105 115
   const txs = await api.getTransactions(address, {
106 116
     minLedgerVersion: minLedgerVersion,
107 117
     earliestFirst: true,
@@ -110,7 +120,8 @@ export const getTransactions = async (api: RippleAPI, address: string, minLedger
110 120
   return txs
111 121
 }
112 122
 
113
-export const writeRaw = async (api: RippleAPI, data: Memo, from: string, to: string, secret: string, sequence?: number): Promise<string> => {
123
+export const writeRaw = async (api: RippleAPI, data: Memo, from:
124
+  string, to: string, secret: string, sequence?: number): Promise<string> => {
114 125
   //if (memoSize(data) > 1000) throw new Error("data length exceeds capacity")
115 126
   try {
116 127
     if (!sequence) {
@@ -121,19 +132,38 @@ export const writeRaw = async (api: RippleAPI, data: Memo, from: string, to: str
121 132
     const resp = await sendPayment(api, [data], from, to, secret, sequence)
122 133
     return resp['tx_json'].hash
123 134
   } catch (error) {
124
-    console.log("WRITERAW ERR", error);
135
+    if(debug){
136
+      console.log("WRITERAW ERR", error);
137
+    }
138
+    throw error
125 139
   }
126 140
 }
127 141
 
128 142
 
129 143
 export const readRaw = async (api: RippleAPI, hash: string): Promise<Memo> => {
130
-  const tx = await api.getTransaction(hash, {
131
-    minLedgerVersion: 16392480
132
-  })
144
+  let _api
145
+  if(!api.isConnected()){
146
+    _api = await cloneApi(api)
147
+  }else{
148
+    _api = api
149
+  }
150
+  let tx
151
+  try{
152
+    tx = await _api.getTransaction(hash, {
153
+      minLedgerVersion: 25235454
154
+    })
155
+  }catch(e){
156
+    if(debug){
157
+      console.log("READRAW ERR", e)
158
+      throw e
159
+    }
160
+  }finally{
161
+    await _api.disconnect()
162
+  }
163
+
133 164
   if (!tx || !tx.specification || !tx.specification['memos'] || !tx.specification['memos'][0]) {
134 165
     throw new Error('Invalid Transaction ' + hash)
135 166
   }
136
-
137 167
   return tx.specification['memos'][0]
138 168
 }
139 169
 

+ 4
- 0
test/CONSTANTS.ts 파일 보기

@@ -1,4 +1,6 @@
1 1
 import { Wallet } from "../src/util/types";
2
+import { readFileSync } from 'fs'
3
+const Path = require('path')
2 4
 
3 5
 export const TEST_CONFIG = {
4 6
     "rippleNode": "wss://s.altnet.rippletest.net:51233"
@@ -22,6 +24,8 @@ export const makeTestnetWallet = () : Promise<Wallet> => fetch('https://faucet.a
22 24
     })
23 25
 });
24 26
 
27
+export const htmlTxt = readFileSync(Path.resolve(__dirname, '..', '..', 'test', 'index.html')).toString('ascii')
28
+
25 29
 export const longText = `Software testing
26 30
 From Wikipedia, the free encyclopedia
27 31
 Jump to navigationJump to search

+ 1
- 0
test/index.html
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 16
- 5
test/primitives.ts 파일 보기

@@ -1,5 +1,5 @@
1 1
 import { RippleAPI } from 'ripple-lib'
2
-import { longText, makeTestnetWallet, TEST_CONFIG, TEST_DATA } from './CONSTANTS'
2
+import { htmlTxt, longText, makeTestnetWallet, TEST_CONFIG, TEST_DATA } from './CONSTANTS'
3 3
 import { getLatestSequence, sendPayment, treeRead, treeWrite } from '../src/xrpIO/ripple-binding'
4 4
 import * as chai from 'chai';
5 5
 import { Wallet } from '../src/util/types';
@@ -19,7 +19,7 @@ describe('XRPIO', () => {
19 19
         await new Promise((res, rej) => setTimeout(res, 10000)) //it takes a moment for the wallets to become active
20 20
     })
21 21
 
22
-    before(async () => {
22
+    beforeEach(async () => {
23 23
         try {
24 24
             api = new RippleAPI({ server: TEST_CONFIG.rippleNode })
25 25
             return await api.connect()
@@ -29,7 +29,7 @@ describe('XRPIO', () => {
29 29
         }
30 30
     })
31 31
 
32
-    after(async function () {
32
+    afterEach(async function () {
33 33
         try {
34 34
             return await api.disconnect()
35 35
         } catch (e) {
@@ -64,7 +64,7 @@ describe('XRPIO', () => {
64 64
         })
65 65
 
66 66
         it('can tree read', async function () {
67
-            this.timeout(1500)
67
+            this.timeout(15000)
68 68
             const data = await treeRead(api, [treeRoot])
69 69
             expect(data).to.be.equal(TEST_DATA)
70 70
         })
@@ -75,11 +75,22 @@ describe('XRPIO', () => {
75 75
         })
76 76
 
77 77
         it('can tree read large', async function () {
78
-            this.timeout(3000)
78
+            this.timeout(30000)
79 79
             const data = await treeRead(api, [treeRoot])
80 80
             expect(data).to.be.equal(longText)
81 81
         })
82 82
 
83
+        it(`can tree write extra large (${htmlTxt.length} bytes)`, async function () {
84
+            this.timeout(300000)
85
+            treeRoot = await treeWrite(api, htmlTxt, sendWallet, receiveWallet.address)
86
+        })
87
+
88
+        it('can tree read extra large', async function () {
89
+            this.timeout(300000)
90
+            const data = await treeRead(api, [treeRoot])
91
+            expect(data).to.be.equal(htmlTxt)
92
+        })
93
+
83 94
         it("can r/w binary", async function () {
84 95
             this.timeout(10000);
85 96
 

Loading…
취소
저장