@xyo-network/react-archivist 2.45.0-rc.15 → 2.45.0-rc.17

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.
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useArchivist = void 0;
3
+ exports.useWrappedArchivist = exports.useArchivist = void 0;
4
4
  const archivist_1 = require("@xyo-network/archivist");
5
5
  const react_node_1 = require("@xyo-network/react-node");
6
- exports.useArchivist = (0, react_node_1.createUseModuleHook)((module) => archivist_1.ArchivistWrapper.tryWrap(module), react_node_1.useNode);
6
+ const useArchivist = (nameOrAddress) => (0, react_node_1.useModule)(nameOrAddress);
7
+ exports.useArchivist = useArchivist;
8
+ exports.useWrappedArchivist = (0, react_node_1.WrappedModuleHookFactory)(archivist_1.ArchivistWrapper);
7
9
  //# sourceMappingURL=useArchivist.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useArchivist.js","sourceRoot":"","sources":["../../../src/hooks/useArchivist.tsx"],"names":[],"mappings":";;;AAAA,sDAA0E;AAC1E,wDAAsE;AAEzD,QAAA,YAAY,GAAG,IAAA,gCAAmB,EAAoC,CAAC,MAAM,EAAE,EAAE,CAAC,4BAAgB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,oBAAO,CAAC,CAAA"}
1
+ {"version":3,"file":"useArchivist.js","sourceRoot":"","sources":["../../../src/hooks/useArchivist.tsx"],"names":[],"mappings":";;;AAAA,sDAA0E;AAC1E,wDAA6E;AAEtE,MAAM,YAAY,GAAG,CAAC,aAAsB,EAAE,EAAE,CAAC,IAAA,sBAAS,EAAkB,aAAa,CAAC,CAAA;AAApF,QAAA,YAAY,gBAAwE;AAEpF,QAAA,mBAAmB,GAAG,IAAA,qCAAwB,EAAC,4BAAgB,CAAC,CAAA"}
package/dist/docs.json CHANGED
@@ -26,7 +26,7 @@
26
26
  "fileName": "packages/modules/packages/archivist/src/components/Details/Details.tsx",
27
27
  "line": 20,
28
28
  "character": 2,
29
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/components/Details/Details.tsx#L20"
29
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/components/Details/Details.tsx#L20"
30
30
  }
31
31
  ],
32
32
  "type": {
@@ -18396,13 +18396,13 @@
18396
18396
  "fileName": "packages/modules/packages/archivist/src/components/Details/Details.tsx",
18397
18397
  "line": 19,
18398
18398
  "character": 17,
18399
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/components/Details/Details.tsx#L19"
18399
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/components/Details/Details.tsx#L19"
18400
18400
  },
18401
18401
  {
18402
18402
  "fileName": "packages/modules/packages/archivist/src/components/Details/Details.tsx",
18403
18403
  "line": 23,
18404
18404
  "character": 13,
18405
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/components/Details/Details.tsx#L23"
18405
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/components/Details/Details.tsx#L23"
18406
18406
  }
18407
18407
  ],
18408
18408
  "extendedTypes": [
@@ -18415,7 +18415,7 @@
18415
18415
  ]
18416
18416
  },
18417
18417
  {
18418
- "id": 424,
18418
+ "id": 418,
18419
18419
  "name": "RefreshCallback",
18420
18420
  "kind": 4194304,
18421
18421
  "kindString": "Type alias",
@@ -18425,13 +18425,13 @@
18425
18425
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx",
18426
18426
  "line": 7,
18427
18427
  "character": 12,
18428
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L7"
18428
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L7"
18429
18429
  }
18430
18430
  ],
18431
18431
  "type": {
18432
18432
  "type": "reflection",
18433
18433
  "declaration": {
18434
- "id": 425,
18434
+ "id": 419,
18435
18435
  "name": "__type",
18436
18436
  "kind": 65536,
18437
18437
  "kindString": "Type literal",
@@ -18441,12 +18441,12 @@
18441
18441
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx",
18442
18442
  "line": 7,
18443
18443
  "character": 30,
18444
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L7"
18444
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L7"
18445
18445
  }
18446
18446
  ],
18447
18447
  "signatures": [
18448
18448
  {
18449
- "id": 426,
18449
+ "id": 420,
18450
18450
  "name": "__type",
18451
18451
  "kind": 4096,
18452
18452
  "kindString": "Call signature",
@@ -18471,7 +18471,7 @@
18471
18471
  "fileName": "packages/modules/packages/archivist/src/components/Card/Card.tsx",
18472
18472
  "line": 8,
18473
18473
  "character": 13,
18474
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/components/Card/Card.tsx#L8"
18474
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/components/Card/Card.tsx#L8"
18475
18475
  }
18476
18476
  ],
18477
18477
  "signatures": [
@@ -19749,7 +19749,7 @@
19749
19749
  "fileName": "packages/modules/packages/archivist/src/components/Card/CardContent.tsx",
19750
19750
  "line": 10,
19751
19751
  "character": 13,
19752
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/components/Card/CardContent.tsx#L10"
19752
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/components/Card/CardContent.tsx#L10"
19753
19753
  }
19754
19754
  ],
19755
19755
  "signatures": [
@@ -19953,7 +19953,7 @@
19953
19953
  "fileName": "packages/modules/packages/archivist/src/components/Card/CardHeader.tsx",
19954
19954
  "line": 5,
19955
19955
  "character": 13,
19956
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/components/Card/CardHeader.tsx#L5"
19956
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/components/Card/CardHeader.tsx#L5"
19957
19957
  }
19958
19958
  ],
19959
19959
  "signatures": [
@@ -20181,13 +20181,13 @@
20181
20181
  "fileName": "packages/modules/packages/archivist/src/components/Details/Details.tsx",
20182
20182
  "line": 19,
20183
20183
  "character": 17,
20184
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/components/Details/Details.tsx#L19"
20184
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/components/Details/Details.tsx#L19"
20185
20185
  },
20186
20186
  {
20187
20187
  "fileName": "packages/modules/packages/archivist/src/components/Details/Details.tsx",
20188
20188
  "line": 23,
20189
20189
  "character": 13,
20190
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/components/Details/Details.tsx#L23"
20190
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/components/Details/Details.tsx#L23"
20191
20191
  }
20192
20192
  ],
20193
20193
  "signatures": [
@@ -20263,7 +20263,7 @@
20263
20263
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivist.tsx",
20264
20264
  "line": 4,
20265
20265
  "character": 13,
20266
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivist.tsx#L4"
20266
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivist.tsx#L4"
20267
20267
  }
20268
20268
  ],
20269
20269
  "signatures": [
@@ -20276,7 +20276,7 @@
20276
20276
  "parameters": [
20277
20277
  {
20278
20278
  "id": 402,
20279
- "name": "name",
20279
+ "name": "nameOrAddress",
20280
20280
  "kind": 32768,
20281
20281
  "kindString": "Parameter",
20282
20282
  "flags": {
@@ -20323,295 +20323,11 @@
20323
20323
  }
20324
20324
  ]
20325
20325
  }
20326
- },
20327
- {
20328
- "id": 403,
20329
- "name": "useArchivist",
20330
- "kind": 4096,
20331
- "kindString": "Call signature",
20332
- "flags": {},
20333
- "parameters": [
20334
- {
20335
- "id": 404,
20336
- "name": "name",
20337
- "kind": 32768,
20338
- "kindString": "Parameter",
20339
- "flags": {},
20340
- "type": {
20341
- "type": "union",
20342
- "types": [
20343
- {
20344
- "type": "intrinsic",
20345
- "name": "undefined"
20346
- },
20347
- {
20348
- "type": "intrinsic",
20349
- "name": "string"
20350
- }
20351
- ]
20352
- }
20353
- },
20354
- {
20355
- "id": 405,
20356
- "name": "wrap",
20357
- "kind": 32768,
20358
- "kindString": "Parameter",
20359
- "flags": {},
20360
- "type": {
20361
- "type": "union",
20362
- "types": [
20363
- {
20364
- "type": "literal",
20365
- "value": true
20366
- },
20367
- {
20368
- "type": "reference",
20369
- "name": "Account",
20370
- "qualifiedName": "Account",
20371
- "package": "@xyo-network/account"
20372
- }
20373
- ]
20374
- }
20375
- }
20376
- ],
20377
- "type": {
20378
- "type": "tuple",
20379
- "elements": [
20380
- {
20381
- "type": "union",
20382
- "types": [
20383
- {
20384
- "type": "intrinsic",
20385
- "name": "undefined"
20386
- },
20387
- {
20388
- "type": "reference",
20389
- "name": "ArchivistWrapper",
20390
- "qualifiedName": "ArchivistWrapper",
20391
- "package": "@xyo-network/archivist-wrapper"
20392
- }
20393
- ]
20394
- },
20395
- {
20396
- "type": "union",
20397
- "types": [
20398
- {
20399
- "type": "intrinsic",
20400
- "name": "undefined"
20401
- },
20402
- {
20403
- "type": "reference",
20404
- "name": "Error",
20405
- "qualifiedName": "Error",
20406
- "package": "typescript"
20407
- }
20408
- ]
20409
- }
20410
- ]
20411
- }
20412
- },
20413
- {
20414
- "id": 406,
20415
- "name": "useArchivist",
20416
- "kind": 4096,
20417
- "kindString": "Call signature",
20418
- "flags": {},
20419
- "parameters": [
20420
- {
20421
- "id": 407,
20422
- "name": "wrap",
20423
- "kind": 32768,
20424
- "kindString": "Parameter",
20425
- "flags": {},
20426
- "type": {
20427
- "type": "union",
20428
- "types": [
20429
- {
20430
- "type": "literal",
20431
- "value": true
20432
- },
20433
- {
20434
- "type": "reference",
20435
- "name": "Account",
20436
- "qualifiedName": "Account",
20437
- "package": "@xyo-network/account"
20438
- }
20439
- ]
20440
- }
20441
- }
20442
- ],
20443
- "type": {
20444
- "type": "tuple",
20445
- "elements": [
20446
- {
20447
- "type": "union",
20448
- "types": [
20449
- {
20450
- "type": "intrinsic",
20451
- "name": "undefined"
20452
- },
20453
- {
20454
- "type": "reference",
20455
- "name": "ArchivistWrapper",
20456
- "qualifiedName": "ArchivistWrapper",
20457
- "package": "@xyo-network/archivist-wrapper"
20458
- }
20459
- ]
20460
- },
20461
- {
20462
- "type": "union",
20463
- "types": [
20464
- {
20465
- "type": "intrinsic",
20466
- "name": "undefined"
20467
- },
20468
- {
20469
- "type": "reference",
20470
- "name": "Error",
20471
- "qualifiedName": "Error",
20472
- "package": "typescript"
20473
- }
20474
- ]
20475
- }
20476
- ]
20477
- }
20478
- },
20479
- {
20480
- "id": 408,
20481
- "name": "useArchivist",
20482
- "kind": 4096,
20483
- "kindString": "Call signature",
20484
- "flags": {},
20485
- "parameters": [
20486
- {
20487
- "id": 409,
20488
- "name": "address",
20489
- "kind": 32768,
20490
- "kindString": "Parameter",
20491
- "flags": {},
20492
- "type": {
20493
- "type": "intrinsic",
20494
- "name": "string"
20495
- }
20496
- }
20497
- ],
20498
- "type": {
20499
- "type": "tuple",
20500
- "elements": [
20501
- {
20502
- "type": "union",
20503
- "types": [
20504
- {
20505
- "type": "intrinsic",
20506
- "name": "undefined"
20507
- },
20508
- {
20509
- "type": "reference",
20510
- "name": "ArchivistModule",
20511
- "qualifiedName": "ArchivistModule",
20512
- "package": "@xyo-network/archivist-interface"
20513
- }
20514
- ]
20515
- },
20516
- {
20517
- "type": "union",
20518
- "types": [
20519
- {
20520
- "type": "intrinsic",
20521
- "name": "undefined"
20522
- },
20523
- {
20524
- "type": "reference",
20525
- "name": "Error",
20526
- "qualifiedName": "Error",
20527
- "package": "typescript"
20528
- }
20529
- ]
20530
- }
20531
- ]
20532
- }
20533
- },
20534
- {
20535
- "id": 410,
20536
- "name": "useArchivist",
20537
- "kind": 4096,
20538
- "kindString": "Call signature",
20539
- "flags": {},
20540
- "parameters": [
20541
- {
20542
- "id": 411,
20543
- "name": "address",
20544
- "kind": 32768,
20545
- "kindString": "Parameter",
20546
- "flags": {},
20547
- "type": {
20548
- "type": "intrinsic",
20549
- "name": "string"
20550
- }
20551
- },
20552
- {
20553
- "id": 412,
20554
- "name": "wrap",
20555
- "kind": 32768,
20556
- "kindString": "Parameter",
20557
- "flags": {},
20558
- "type": {
20559
- "type": "union",
20560
- "types": [
20561
- {
20562
- "type": "literal",
20563
- "value": true
20564
- },
20565
- {
20566
- "type": "reference",
20567
- "name": "Account",
20568
- "qualifiedName": "Account",
20569
- "package": "@xyo-network/account"
20570
- }
20571
- ]
20572
- }
20573
- }
20574
- ],
20575
- "type": {
20576
- "type": "tuple",
20577
- "elements": [
20578
- {
20579
- "type": "union",
20580
- "types": [
20581
- {
20582
- "type": "intrinsic",
20583
- "name": "undefined"
20584
- },
20585
- {
20586
- "type": "reference",
20587
- "name": "ArchivistWrapper",
20588
- "qualifiedName": "ArchivistWrapper",
20589
- "package": "@xyo-network/archivist-wrapper"
20590
- }
20591
- ]
20592
- },
20593
- {
20594
- "type": "union",
20595
- "types": [
20596
- {
20597
- "type": "intrinsic",
20598
- "name": "undefined"
20599
- },
20600
- {
20601
- "type": "reference",
20602
- "name": "Error",
20603
- "qualifiedName": "Error",
20604
- "package": "typescript"
20605
- }
20606
- ]
20607
- }
20608
- ]
20609
- }
20610
20326
  }
20611
20327
  ]
20612
20328
  },
20613
20329
  {
20614
- "id": 413,
20330
+ "id": 407,
20615
20331
  "name": "useArchivistAll",
20616
20332
  "kind": 64,
20617
20333
  "kindString": "Function",
@@ -20621,12 +20337,12 @@
20621
20337
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivistAll.tsx",
20622
20338
  "line": 6,
20623
20339
  "character": 13,
20624
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivistAll.tsx#L6"
20340
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivistAll.tsx#L6"
20625
20341
  }
20626
20342
  ],
20627
20343
  "signatures": [
20628
20344
  {
20629
- "id": 414,
20345
+ "id": 408,
20630
20346
  "name": "useArchivistAll",
20631
20347
  "kind": 4096,
20632
20348
  "kindString": "Call signature",
@@ -20660,7 +20376,7 @@
20660
20376
  {
20661
20377
  "type": "reflection",
20662
20378
  "declaration": {
20663
- "id": 415,
20379
+ "id": 409,
20664
20380
  "name": "__type",
20665
20381
  "kind": 65536,
20666
20382
  "kindString": "Type literal",
@@ -20686,7 +20402,7 @@
20686
20402
  {
20687
20403
  "type": "reflection",
20688
20404
  "declaration": {
20689
- "id": 416,
20405
+ "id": 410,
20690
20406
  "name": "__type",
20691
20407
  "kind": 65536,
20692
20408
  "kindString": "Type literal",
@@ -20696,12 +20412,12 @@
20696
20412
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx",
20697
20413
  "line": 14,
20698
20414
  "character": 26,
20699
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L14"
20415
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L14"
20700
20416
  }
20701
20417
  ],
20702
20418
  "signatures": [
20703
20419
  {
20704
- "id": 417,
20420
+ "id": 411,
20705
20421
  "name": "__type",
20706
20422
  "kind": 4096,
20707
20423
  "kindString": "Call signature",
@@ -20721,7 +20437,7 @@
20721
20437
  ]
20722
20438
  },
20723
20439
  {
20724
- "id": 418,
20440
+ "id": 412,
20725
20441
  "name": "useArchivistGet",
20726
20442
  "kind": 64,
20727
20443
  "kindString": "Function",
@@ -20731,19 +20447,19 @@
20731
20447
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivistGet.tsx",
20732
20448
  "line": 7,
20733
20449
  "character": 13,
20734
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivistGet.tsx#L7"
20450
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivistGet.tsx#L7"
20735
20451
  }
20736
20452
  ],
20737
20453
  "signatures": [
20738
20454
  {
20739
- "id": 419,
20455
+ "id": 413,
20740
20456
  "name": "useArchivistGet",
20741
20457
  "kind": 4096,
20742
20458
  "kindString": "Call signature",
20743
20459
  "flags": {},
20744
20460
  "typeParameter": [
20745
20461
  {
20746
- "id": 422,
20462
+ "id": 416,
20747
20463
  "name": "T",
20748
20464
  "kind": 131072,
20749
20465
  "kindString": "Type parameter",
@@ -20766,7 +20482,7 @@
20766
20482
  {
20767
20483
  "type": "reflection",
20768
20484
  "declaration": {
20769
- "id": 420,
20485
+ "id": 414,
20770
20486
  "name": "__type",
20771
20487
  "kind": 65536,
20772
20488
  "kindString": "Type literal",
@@ -20800,7 +20516,7 @@
20800
20516
  {
20801
20517
  "type": "reflection",
20802
20518
  "declaration": {
20803
- "id": 421,
20519
+ "id": 415,
20804
20520
  "name": "__type",
20805
20521
  "kind": 65536,
20806
20522
  "kindString": "Type literal",
@@ -20820,7 +20536,7 @@
20820
20536
  ],
20821
20537
  "parameters": [
20822
20538
  {
20823
- "id": 423,
20539
+ "id": 417,
20824
20540
  "name": "hashes",
20825
20541
  "kind": 32768,
20826
20542
  "kindString": "Parameter",
@@ -20845,7 +20561,7 @@
20845
20561
  "type": "array",
20846
20562
  "elementType": {
20847
20563
  "type": "reference",
20848
- "id": 422,
20564
+ "id": 416,
20849
20565
  "name": "T"
20850
20566
  }
20851
20567
  }
@@ -20863,7 +20579,7 @@
20863
20579
  "type": "optional",
20864
20580
  "elementType": {
20865
20581
  "type": "reference",
20866
- "id": 424,
20582
+ "id": 418,
20867
20583
  "name": "RefreshCallback"
20868
20584
  }
20869
20585
  }
@@ -20873,7 +20589,7 @@
20873
20589
  ]
20874
20590
  },
20875
20591
  {
20876
- "id": 427,
20592
+ "id": 421,
20877
20593
  "name": "useArchivistStates",
20878
20594
  "kind": 64,
20879
20595
  "kindString": "Function",
@@ -20883,19 +20599,19 @@
20883
20599
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx",
20884
20600
  "line": 9,
20885
20601
  "character": 13,
20886
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L9"
20602
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L9"
20887
20603
  }
20888
20604
  ],
20889
20605
  "signatures": [
20890
20606
  {
20891
- "id": 428,
20607
+ "id": 422,
20892
20608
  "name": "useArchivistStates",
20893
20609
  "kind": 4096,
20894
20610
  "kindString": "Call signature",
20895
20611
  "flags": {},
20896
20612
  "typeParameter": [
20897
20613
  {
20898
- "id": 431,
20614
+ "id": 425,
20899
20615
  "name": "T",
20900
20616
  "kind": 131072,
20901
20617
  "kindString": "Type parameter",
@@ -20918,7 +20634,7 @@
20918
20634
  {
20919
20635
  "type": "reflection",
20920
20636
  "declaration": {
20921
- "id": 429,
20637
+ "id": 423,
20922
20638
  "name": "__type",
20923
20639
  "kind": 65536,
20924
20640
  "kindString": "Type literal",
@@ -20952,7 +20668,7 @@
20952
20668
  {
20953
20669
  "type": "reflection",
20954
20670
  "declaration": {
20955
- "id": 430,
20671
+ "id": 424,
20956
20672
  "name": "__type",
20957
20673
  "kind": 65536,
20958
20674
  "kindString": "Type literal",
@@ -20973,14 +20689,14 @@
20973
20689
  "type": {
20974
20690
  "type": "reflection",
20975
20691
  "declaration": {
20976
- "id": 432,
20692
+ "id": 426,
20977
20693
  "name": "__type",
20978
20694
  "kind": 65536,
20979
20695
  "kindString": "Type literal",
20980
20696
  "flags": {},
20981
20697
  "children": [
20982
20698
  {
20983
- "id": 433,
20699
+ "id": 427,
20984
20700
  "name": "archivist",
20985
20701
  "kind": 1024,
20986
20702
  "kindString": "Property",
@@ -20990,7 +20706,7 @@
20990
20706
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx",
20991
20707
  "line": 24,
20992
20708
  "character": 11,
20993
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
20709
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
20994
20710
  }
20995
20711
  ],
20996
20712
  "type": {
@@ -21010,7 +20726,7 @@
21010
20726
  }
21011
20727
  },
21012
20728
  {
21013
- "id": 434,
20729
+ "id": 428,
21014
20730
  "name": "error",
21015
20731
  "kind": 1024,
21016
20732
  "kindString": "Property",
@@ -21020,7 +20736,7 @@
21020
20736
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx",
21021
20737
  "line": 24,
21022
20738
  "character": 22,
21023
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
20739
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
21024
20740
  }
21025
20741
  ],
21026
20742
  "type": {
@@ -21040,7 +20756,7 @@
21040
20756
  }
21041
20757
  },
21042
20758
  {
21043
- "id": 435,
20759
+ "id": 429,
21044
20760
  "name": "payloads",
21045
20761
  "kind": 1024,
21046
20762
  "kindString": "Property",
@@ -21050,7 +20766,7 @@
21050
20766
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx",
21051
20767
  "line": 24,
21052
20768
  "character": 29,
21053
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
20769
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
21054
20770
  }
21055
20771
  ],
21056
20772
  "type": {
@@ -21064,7 +20780,7 @@
21064
20780
  "type": "array",
21065
20781
  "elementType": {
21066
20782
  "type": "reference",
21067
- "id": 431,
20783
+ "id": 425,
21068
20784
  "name": "T"
21069
20785
  }
21070
20786
  }
@@ -21072,7 +20788,7 @@
21072
20788
  }
21073
20789
  },
21074
20790
  {
21075
- "id": 436,
20791
+ "id": 430,
21076
20792
  "name": "refresh",
21077
20793
  "kind": 1024,
21078
20794
  "kindString": "Property",
@@ -21082,13 +20798,13 @@
21082
20798
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx",
21083
20799
  "line": 24,
21084
20800
  "character": 39,
21085
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
20801
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
21086
20802
  }
21087
20803
  ],
21088
20804
  "type": {
21089
20805
  "type": "reflection",
21090
20806
  "declaration": {
21091
- "id": 437,
20807
+ "id": 431,
21092
20808
  "name": "__type",
21093
20809
  "kind": 65536,
21094
20810
  "kindString": "Type literal",
@@ -21098,12 +20814,12 @@
21098
20814
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx",
21099
20815
  "line": 14,
21100
20816
  "character": 26,
21101
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L14"
20817
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L14"
21102
20818
  }
21103
20819
  ],
21104
20820
  "signatures": [
21105
20821
  {
21106
- "id": 438,
20822
+ "id": 432,
21107
20823
  "name": "__type",
21108
20824
  "kind": 4096,
21109
20825
  "kindString": "Call signature",
@@ -21119,7 +20835,7 @@
21119
20835
  "defaultValue": "refreshPayloads"
21120
20836
  },
21121
20837
  {
21122
- "id": 439,
20838
+ "id": 433,
21123
20839
  "name": "refreshCount",
21124
20840
  "kind": 1024,
21125
20841
  "kindString": "Property",
@@ -21129,7 +20845,7 @@
21129
20845
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx",
21130
20846
  "line": 24,
21131
20847
  "character": 65,
21132
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
20848
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
21133
20849
  }
21134
20850
  ],
21135
20851
  "type": {
@@ -21138,7 +20854,7 @@
21138
20854
  }
21139
20855
  },
21140
20856
  {
21141
- "id": 440,
20857
+ "id": 434,
21142
20858
  "name": "setError",
21143
20859
  "kind": 1024,
21144
20860
  "kindString": "Property",
@@ -21148,7 +20864,7 @@
21148
20864
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx",
21149
20865
  "line": 24,
21150
20866
  "character": 79,
21151
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
20867
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
21152
20868
  }
21153
20869
  ],
21154
20870
  "type": {
@@ -21184,7 +20900,7 @@
21184
20900
  }
21185
20901
  },
21186
20902
  {
21187
- "id": 441,
20903
+ "id": 435,
21188
20904
  "name": "setPayloads",
21189
20905
  "kind": 1024,
21190
20906
  "kindString": "Property",
@@ -21194,7 +20910,7 @@
21194
20910
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx",
21195
20911
  "line": 24,
21196
20912
  "character": 89,
21197
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
20913
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
21198
20914
  }
21199
20915
  ],
21200
20916
  "type": {
@@ -21214,7 +20930,7 @@
21214
20930
  "type": "array",
21215
20931
  "elementType": {
21216
20932
  "type": "reference",
21217
- "id": 431,
20933
+ "id": 425,
21218
20934
  "name": "T"
21219
20935
  }
21220
20936
  }
@@ -21236,13 +20952,13 @@
21236
20952
  {
21237
20953
  "title": "Properties",
21238
20954
  "children": [
20955
+ 427,
20956
+ 428,
20957
+ 429,
20958
+ 430,
21239
20959
  433,
21240
20960
  434,
21241
- 435,
21242
- 436,
21243
- 439,
21244
- 440,
21245
- 441
20961
+ 435
21246
20962
  ]
21247
20963
  }
21248
20964
  ],
@@ -21251,13 +20967,102 @@
21251
20967
  "fileName": "packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx",
21252
20968
  "line": 24,
21253
20969
  "character": 9,
21254
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
20970
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivistStates.tsx#L24"
21255
20971
  }
21256
20972
  ]
21257
20973
  }
21258
20974
  }
21259
20975
  }
21260
20976
  ]
20977
+ },
20978
+ {
20979
+ "id": 403,
20980
+ "name": "useWrappedArchivist",
20981
+ "kind": 64,
20982
+ "kindString": "Function",
20983
+ "flags": {},
20984
+ "sources": [
20985
+ {
20986
+ "fileName": "packages/modules/packages/archivist/src/hooks/useArchivist.tsx",
20987
+ "line": 6,
20988
+ "character": 13,
20989
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/hooks/useArchivist.tsx#L6"
20990
+ }
20991
+ ],
20992
+ "signatures": [
20993
+ {
20994
+ "id": 404,
20995
+ "name": "useWrappedArchivist",
20996
+ "kind": 4096,
20997
+ "kindString": "Call signature",
20998
+ "flags": {},
20999
+ "parameters": [
21000
+ {
21001
+ "id": 405,
21002
+ "name": "nameOrAddress",
21003
+ "kind": 32768,
21004
+ "kindString": "Parameter",
21005
+ "flags": {
21006
+ "isOptional": true
21007
+ },
21008
+ "type": {
21009
+ "type": "intrinsic",
21010
+ "name": "string"
21011
+ }
21012
+ },
21013
+ {
21014
+ "id": 406,
21015
+ "name": "account",
21016
+ "kind": 32768,
21017
+ "kindString": "Parameter",
21018
+ "flags": {
21019
+ "isOptional": true
21020
+ },
21021
+ "type": {
21022
+ "type": "reference",
21023
+ "name": "AccountInstance",
21024
+ "qualifiedName": "AccountInstance",
21025
+ "package": "@xyo-network/account-model"
21026
+ }
21027
+ }
21028
+ ],
21029
+ "type": {
21030
+ "type": "tuple",
21031
+ "elements": [
21032
+ {
21033
+ "type": "union",
21034
+ "types": [
21035
+ {
21036
+ "type": "intrinsic",
21037
+ "name": "undefined"
21038
+ },
21039
+ {
21040
+ "type": "reference",
21041
+ "name": "ArchivistWrapper",
21042
+ "qualifiedName": "ArchivistWrapper",
21043
+ "package": "@xyo-network/archivist-wrapper"
21044
+ }
21045
+ ]
21046
+ },
21047
+ {
21048
+ "type": "union",
21049
+ "types": [
21050
+ {
21051
+ "type": "intrinsic",
21052
+ "name": "undefined"
21053
+ },
21054
+ {
21055
+ "type": "reference",
21056
+ "name": "Error",
21057
+ "qualifiedName": "Error",
21058
+ "package": "typescript"
21059
+ }
21060
+ ]
21061
+ }
21062
+ ]
21063
+ }
21064
+ }
21065
+ ]
21261
21066
  }
21262
21067
  ],
21263
21068
  "groups": [
@@ -21270,7 +21075,7 @@
21270
21075
  {
21271
21076
  "title": "Type Aliases",
21272
21077
  "children": [
21273
- 424
21078
+ 418
21274
21079
  ]
21275
21080
  },
21276
21081
  {
@@ -21281,9 +21086,10 @@
21281
21086
  14,
21282
21087
  20,
21283
21088
  400,
21284
- 413,
21285
- 418,
21286
- 427
21089
+ 407,
21090
+ 412,
21091
+ 421,
21092
+ 403
21287
21093
  ]
21288
21094
  }
21289
21095
  ],
@@ -21292,7 +21098,7 @@
21292
21098
  "fileName": "packages/modules/packages/archivist/src/index.ts",
21293
21099
  "line": 1,
21294
21100
  "character": 0,
21295
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/d1ecbe2d7cb/packages/modules/packages/archivist/src/index.ts#L1"
21101
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/3f15245d6e5/packages/modules/packages/archivist/src/index.ts#L1"
21296
21102
  }
21297
21103
  ]
21298
21104
  }
@@ -1,4 +1,5 @@
1
1
  import { ArchivistWrapper } from '@xyo-network/archivist';
2
- import { createUseModuleHook, useNode } from '@xyo-network/react-node';
3
- export const useArchivist = createUseModuleHook((module) => ArchivistWrapper.tryWrap(module), useNode);
2
+ import { useModule, WrappedModuleHookFactory } from '@xyo-network/react-node';
3
+ export const useArchivist = (nameOrAddress) => useModule(nameOrAddress);
4
+ export const useWrappedArchivist = WrappedModuleHookFactory(ArchivistWrapper);
4
5
  //# sourceMappingURL=useArchivist.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useArchivist.js","sourceRoot":"","sources":["../../../src/hooks/useArchivist.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC1E,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEtE,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAoC,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAA"}
1
+ {"version":3,"file":"useArchivist.js","sourceRoot":"","sources":["../../../src/hooks/useArchivist.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC1E,OAAO,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAE7E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,aAAsB,EAAE,EAAE,CAAC,SAAS,CAAkB,aAAa,CAAC,CAAA;AAEjG,MAAM,CAAC,MAAM,mBAAmB,GAAG,wBAAwB,CAAC,gBAAgB,CAAC,CAAA"}
@@ -1,9 +1,4 @@
1
1
  import { ArchivistModule, ArchivistWrapper } from '@xyo-network/archivist';
2
- export declare const useArchivist: {
3
- (name?: string | undefined): [ArchivistModule | undefined, Error | undefined];
4
- (name: string | undefined, wrap: true | import("@xyo-network/account").Account): [ArchivistWrapper | undefined, Error | undefined];
5
- (wrap: true | import("@xyo-network/account").Account): [ArchivistWrapper | undefined, Error | undefined];
6
- (address: string): [ArchivistModule | undefined, Error | undefined];
7
- (address: string, wrap: true | import("@xyo-network/account").Account): [ArchivistWrapper | undefined, Error | undefined];
8
- };
2
+ export declare const useArchivist: (nameOrAddress?: string) => [ArchivistModule | undefined, Error | undefined];
3
+ export declare const useWrappedArchivist: (nameOrAddress?: string | undefined, account?: import("@xyo-network/account-model").AccountInstance | undefined) => [ArchivistWrapper | undefined, Error | undefined];
9
4
  //# sourceMappingURL=useArchivist.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useArchivist.d.ts","sourceRoot":"","sources":["../../../src/hooks/useArchivist.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAG1E,eAAO,MAAM,YAAY;;;;;;CAAgH,CAAA"}
1
+ {"version":3,"file":"useArchivist.d.ts","sourceRoot":"","sources":["../../../src/hooks/useArchivist.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAG1E,eAAO,MAAM,YAAY,mBAAoB,MAAM,qDAA8C,CAAA;AAEjG,eAAO,MAAM,mBAAmB,uKAA6C,CAAA"}
package/package.json CHANGED
@@ -14,9 +14,9 @@
14
14
  "@xylabs/react-flexbox": "^2.16.8",
15
15
  "@xylabs/react-shared": "^2.16.8",
16
16
  "@xyo-network/node": "^2.51.2",
17
- "@xyo-network/react-module": "^2.45.0-rc.15",
18
- "@xyo-network/react-node": "^2.45.0-rc.15",
19
- "@xyo-network/react-shared": "^2.45.0-rc.15",
17
+ "@xyo-network/react-module": "^2.45.0-rc.17",
18
+ "@xyo-network/react-node": "^2.45.0-rc.17",
19
+ "@xyo-network/react-shared": "^2.45.0-rc.17",
20
20
  "lodash": "^4.17.21"
21
21
  },
22
22
  "peerDependencies": {
@@ -33,13 +33,13 @@
33
33
  "devDependencies": {
34
34
  "@storybook/react": "^6.5.16",
35
35
  "@types/lodash": "^4.14.191",
36
- "@xylabs/ts-scripts-yarn3": "^2.16.0",
37
- "@xylabs/tsconfig-react": "^2.16.0",
36
+ "@xylabs/ts-scripts-yarn3": "^2.16.1",
37
+ "@xylabs/tsconfig-react": "^2.16.1",
38
38
  "@xyo-network/archivist": "^2.51.2",
39
39
  "@xyo-network/archivist-wrapper": "^2.51.2",
40
40
  "@xyo-network/module": "^2.51.2",
41
41
  "@xyo-network/payload-model": "^2.51.2",
42
- "@xyo-network/react-storybook": "^2.45.0-rc.15",
42
+ "@xyo-network/react-storybook": "^2.45.0-rc.17",
43
43
  "require-from-string": "^2.0.2",
44
44
  "typescript": "^4.9.5"
45
45
  },
@@ -85,6 +85,6 @@
85
85
  },
86
86
  "sideEffects": false,
87
87
  "types": "dist/types/index.d.ts",
88
- "version": "2.45.0-rc.15",
88
+ "version": "2.45.0-rc.17",
89
89
  "stableVersion": "2.44.1"
90
90
  }
@@ -1,4 +1,6 @@
1
1
  import { ArchivistModule, ArchivistWrapper } from '@xyo-network/archivist'
2
- import { createUseModuleHook, useNode } from '@xyo-network/react-node'
2
+ import { useModule, WrappedModuleHookFactory } from '@xyo-network/react-node'
3
3
 
4
- export const useArchivist = createUseModuleHook<ArchivistModule, ArchivistWrapper>((module) => ArchivistWrapper.tryWrap(module), useNode)
4
+ export const useArchivist = (nameOrAddress?: string) => useModule<ArchivistModule>(nameOrAddress)
5
+
6
+ export const useWrappedArchivist = WrappedModuleHookFactory(ArchivistWrapper)