@novasamatech/host-api 0.6.1 → 0.6.3

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.
@@ -338,6 +338,7 @@ export declare const MessagePayload: EnumCodec<Record<"host_handshake_request",
338
338
  }>;
339
339
  }>> & Record<"host_chat_action_subscribe_interrupt", Codec<undefined>> & Record<"host_chat_action_subscribe_stop", Codec<undefined>> & Record<"product_chat_custom_message_render_subscribe_start", EnumCodec<{
340
340
  readonly v1: Codec<{
341
+ messageId: string;
341
342
  messageType: string;
342
343
  payload: Uint8Array<ArrayBufferLike>;
343
344
  }>;
@@ -500,7 +501,252 @@ export declare const MessagePayload: EnumCodec<Record<"host_handshake_request",
500
501
  readonly v1: Codec<`0x${string}`>;
501
502
  }>> & Record<"host_jsonrpc_message_subscribe_receive", EnumCodec<{
502
503
  readonly v1: Codec<string>;
503
- }>> & Record<"host_jsonrpc_message_subscribe_interrupt", Codec<undefined>> & Record<"host_jsonrpc_message_subscribe_stop", Codec<undefined>>>;
504
+ }>> & Record<"host_jsonrpc_message_subscribe_interrupt", Codec<undefined>> & Record<"host_jsonrpc_message_subscribe_stop", Codec<undefined>> & Record<"remote_chain_head_follow_start", EnumCodec<{
505
+ readonly v1: Codec<{
506
+ genesisHash: `0x${string}`;
507
+ withRuntime: boolean;
508
+ }>;
509
+ }>> & Record<"remote_chain_head_follow_receive", EnumCodec<{
510
+ readonly v1: Codec<{
511
+ tag: "Initialized";
512
+ value: {
513
+ finalizedBlockHashes: `0x${string}`[];
514
+ finalizedBlockRuntime: {
515
+ tag: "Valid";
516
+ value: {
517
+ specName: string;
518
+ implName: string;
519
+ specVersion: number;
520
+ implVersion: number;
521
+ transactionVersion: number | undefined;
522
+ apis: [string, number][];
523
+ };
524
+ } | {
525
+ tag: "Invalid";
526
+ value: {
527
+ error: string;
528
+ };
529
+ } | undefined;
530
+ };
531
+ } | {
532
+ tag: "NewBlock";
533
+ value: {
534
+ blockHash: `0x${string}`;
535
+ parentBlockHash: `0x${string}`;
536
+ newRuntime: {
537
+ tag: "Valid";
538
+ value: {
539
+ specName: string;
540
+ implName: string;
541
+ specVersion: number;
542
+ implVersion: number;
543
+ transactionVersion: number | undefined;
544
+ apis: [string, number][];
545
+ };
546
+ } | {
547
+ tag: "Invalid";
548
+ value: {
549
+ error: string;
550
+ };
551
+ } | undefined;
552
+ };
553
+ } | {
554
+ tag: "BestBlockChanged";
555
+ value: {
556
+ bestBlockHash: `0x${string}`;
557
+ };
558
+ } | {
559
+ tag: "Finalized";
560
+ value: {
561
+ finalizedBlockHashes: `0x${string}`[];
562
+ prunedBlockHashes: `0x${string}`[];
563
+ };
564
+ } | {
565
+ tag: "OperationBodyDone";
566
+ value: {
567
+ operationId: string;
568
+ value: `0x${string}`[];
569
+ };
570
+ } | {
571
+ tag: "OperationCallDone";
572
+ value: {
573
+ operationId: string;
574
+ output: `0x${string}`;
575
+ };
576
+ } | {
577
+ tag: "OperationStorageItems";
578
+ value: {
579
+ operationId: string;
580
+ items: {
581
+ key: `0x${string}`;
582
+ value: `0x${string}` | null;
583
+ hash: `0x${string}` | null;
584
+ closestDescendantMerkleValue: `0x${string}` | null;
585
+ }[];
586
+ };
587
+ } | {
588
+ tag: "OperationStorageDone";
589
+ value: {
590
+ operationId: string;
591
+ };
592
+ } | {
593
+ tag: "OperationWaitingForContinue";
594
+ value: {
595
+ operationId: string;
596
+ };
597
+ } | {
598
+ tag: "OperationInaccessible";
599
+ value: {
600
+ operationId: string;
601
+ };
602
+ } | {
603
+ tag: "OperationError";
604
+ value: {
605
+ operationId: string;
606
+ error: string;
607
+ };
608
+ } | {
609
+ tag: "Stop";
610
+ value: undefined;
611
+ }>;
612
+ }>> & Record<"remote_chain_head_follow_interrupt", Codec<undefined>> & Record<"remote_chain_head_follow_stop", Codec<undefined>> & Record<"remote_chain_head_header_request", EnumCodec<{
613
+ readonly v1: Codec<{
614
+ genesisHash: `0x${string}`;
615
+ followSubscriptionId: string;
616
+ hash: `0x${string}`;
617
+ }>;
618
+ }>> & Record<"remote_chain_head_header_response", EnumCodec<{
619
+ readonly v1: Codec<import("scale-ts").ResultPayload<`0x${string}` | null, import("@novasamatech/scale").CodecError<{
620
+ reason: string;
621
+ }, "GenericError">>>;
622
+ }>> & Record<"remote_chain_head_body_request", EnumCodec<{
623
+ readonly v1: Codec<{
624
+ genesisHash: `0x${string}`;
625
+ followSubscriptionId: string;
626
+ hash: `0x${string}`;
627
+ }>;
628
+ }>> & Record<"remote_chain_head_body_response", EnumCodec<{
629
+ readonly v1: Codec<import("scale-ts").ResultPayload<{
630
+ tag: "Started";
631
+ value: {
632
+ operationId: string;
633
+ };
634
+ } | {
635
+ tag: "LimitReached";
636
+ value: undefined;
637
+ }, import("@novasamatech/scale").CodecError<{
638
+ reason: string;
639
+ }, "GenericError">>>;
640
+ }>> & Record<"remote_chain_head_storage_request", EnumCodec<{
641
+ readonly v1: Codec<{
642
+ genesisHash: `0x${string}`;
643
+ followSubscriptionId: string;
644
+ hash: `0x${string}`;
645
+ items: {
646
+ key: `0x${string}`;
647
+ type: "Value" | "Hash" | "ClosestDescendantMerkleValue" | "DescendantsValues" | "DescendantsHashes";
648
+ }[];
649
+ childTrie: `0x${string}` | null;
650
+ }>;
651
+ }>> & Record<"remote_chain_head_storage_response", EnumCodec<{
652
+ readonly v1: Codec<import("scale-ts").ResultPayload<{
653
+ tag: "Started";
654
+ value: {
655
+ operationId: string;
656
+ };
657
+ } | {
658
+ tag: "LimitReached";
659
+ value: undefined;
660
+ }, import("@novasamatech/scale").CodecError<{
661
+ reason: string;
662
+ }, "GenericError">>>;
663
+ }>> & Record<"remote_chain_head_call_request", EnumCodec<{
664
+ readonly v1: Codec<{
665
+ genesisHash: `0x${string}`;
666
+ followSubscriptionId: string;
667
+ hash: `0x${string}`;
668
+ function: string;
669
+ callParameters: `0x${string}`;
670
+ }>;
671
+ }>> & Record<"remote_chain_head_call_response", EnumCodec<{
672
+ readonly v1: Codec<import("scale-ts").ResultPayload<{
673
+ tag: "Started";
674
+ value: {
675
+ operationId: string;
676
+ };
677
+ } | {
678
+ tag: "LimitReached";
679
+ value: undefined;
680
+ }, import("@novasamatech/scale").CodecError<{
681
+ reason: string;
682
+ }, "GenericError">>>;
683
+ }>> & Record<"remote_chain_head_unpin_request", EnumCodec<{
684
+ readonly v1: Codec<{
685
+ genesisHash: `0x${string}`;
686
+ followSubscriptionId: string;
687
+ hashes: `0x${string}`[];
688
+ }>;
689
+ }>> & Record<"remote_chain_head_unpin_response", EnumCodec<{
690
+ readonly v1: Codec<import("scale-ts").ResultPayload<undefined, import("@novasamatech/scale").CodecError<{
691
+ reason: string;
692
+ }, "GenericError">>>;
693
+ }>> & Record<"remote_chain_head_continue_request", EnumCodec<{
694
+ readonly v1: Codec<{
695
+ genesisHash: `0x${string}`;
696
+ followSubscriptionId: string;
697
+ operationId: string;
698
+ }>;
699
+ }>> & Record<"remote_chain_head_continue_response", EnumCodec<{
700
+ readonly v1: Codec<import("scale-ts").ResultPayload<undefined, import("@novasamatech/scale").CodecError<{
701
+ reason: string;
702
+ }, "GenericError">>>;
703
+ }>> & Record<"remote_chain_head_stop_operation_request", EnumCodec<{
704
+ readonly v1: Codec<{
705
+ genesisHash: `0x${string}`;
706
+ followSubscriptionId: string;
707
+ operationId: string;
708
+ }>;
709
+ }>> & Record<"remote_chain_head_stop_operation_response", EnumCodec<{
710
+ readonly v1: Codec<import("scale-ts").ResultPayload<undefined, import("@novasamatech/scale").CodecError<{
711
+ reason: string;
712
+ }, "GenericError">>>;
713
+ }>> & Record<"remote_chain_spec_genesis_hash_request", EnumCodec<{
714
+ readonly v1: Codec<`0x${string}`>;
715
+ }>> & Record<"remote_chain_spec_genesis_hash_response", EnumCodec<{
716
+ readonly v1: Codec<import("scale-ts").ResultPayload<`0x${string}`, import("@novasamatech/scale").CodecError<{
717
+ reason: string;
718
+ }, "GenericError">>>;
719
+ }>> & Record<"remote_chain_spec_chain_name_request", EnumCodec<{
720
+ readonly v1: Codec<`0x${string}`>;
721
+ }>> & Record<"remote_chain_spec_chain_name_response", EnumCodec<{
722
+ readonly v1: Codec<import("scale-ts").ResultPayload<string, import("@novasamatech/scale").CodecError<{
723
+ reason: string;
724
+ }, "GenericError">>>;
725
+ }>> & Record<"remote_chain_spec_properties_request", EnumCodec<{
726
+ readonly v1: Codec<`0x${string}`>;
727
+ }>> & Record<"remote_chain_spec_properties_response", EnumCodec<{
728
+ readonly v1: Codec<import("scale-ts").ResultPayload<string, import("@novasamatech/scale").CodecError<{
729
+ reason: string;
730
+ }, "GenericError">>>;
731
+ }>> & Record<"remote_chain_transaction_broadcast_request", EnumCodec<{
732
+ readonly v1: Codec<{
733
+ genesisHash: `0x${string}`;
734
+ transaction: `0x${string}`;
735
+ }>;
736
+ }>> & Record<"remote_chain_transaction_broadcast_response", EnumCodec<{
737
+ readonly v1: Codec<import("scale-ts").ResultPayload<string | null, import("@novasamatech/scale").CodecError<{
738
+ reason: string;
739
+ }, "GenericError">>>;
740
+ }>> & Record<"remote_chain_transaction_stop_request", EnumCodec<{
741
+ readonly v1: Codec<{
742
+ genesisHash: `0x${string}`;
743
+ operationId: string;
744
+ }>;
745
+ }>> & Record<"remote_chain_transaction_stop_response", EnumCodec<{
746
+ readonly v1: Codec<import("scale-ts").ResultPayload<undefined, import("@novasamatech/scale").CodecError<{
747
+ reason: string;
748
+ }, "GenericError">>>;
749
+ }>>>;
504
750
  export declare const Message: Codec<{
505
751
  requestId: string;
506
752
  payload: {
@@ -1037,6 +1283,7 @@ export declare const Message: Codec<{
1037
1283
  value: {
1038
1284
  tag: "v1";
1039
1285
  value: {
1286
+ messageId: string;
1040
1287
  messageType: string;
1041
1288
  payload: Uint8Array<ArrayBufferLike>;
1042
1289
  };
@@ -1284,6 +1531,361 @@ export declare const Message: Codec<{
1284
1531
  } | {
1285
1532
  tag: "host_jsonrpc_message_subscribe_stop";
1286
1533
  value: undefined;
1534
+ } | {
1535
+ tag: "remote_chain_head_follow_start";
1536
+ value: {
1537
+ tag: "v1";
1538
+ value: {
1539
+ genesisHash: `0x${string}`;
1540
+ withRuntime: boolean;
1541
+ };
1542
+ };
1543
+ } | {
1544
+ tag: "remote_chain_head_follow_receive";
1545
+ value: {
1546
+ tag: "v1";
1547
+ value: {
1548
+ tag: "Initialized";
1549
+ value: {
1550
+ finalizedBlockHashes: `0x${string}`[];
1551
+ finalizedBlockRuntime: {
1552
+ tag: "Valid";
1553
+ value: {
1554
+ specName: string;
1555
+ implName: string;
1556
+ specVersion: number;
1557
+ implVersion: number;
1558
+ transactionVersion: number | undefined;
1559
+ apis: [string, number][];
1560
+ };
1561
+ } | {
1562
+ tag: "Invalid";
1563
+ value: {
1564
+ error: string;
1565
+ };
1566
+ } | undefined;
1567
+ };
1568
+ } | {
1569
+ tag: "NewBlock";
1570
+ value: {
1571
+ blockHash: `0x${string}`;
1572
+ parentBlockHash: `0x${string}`;
1573
+ newRuntime: {
1574
+ tag: "Valid";
1575
+ value: {
1576
+ specName: string;
1577
+ implName: string;
1578
+ specVersion: number;
1579
+ implVersion: number;
1580
+ transactionVersion: number | undefined;
1581
+ apis: [string, number][];
1582
+ };
1583
+ } | {
1584
+ tag: "Invalid";
1585
+ value: {
1586
+ error: string;
1587
+ };
1588
+ } | undefined;
1589
+ };
1590
+ } | {
1591
+ tag: "BestBlockChanged";
1592
+ value: {
1593
+ bestBlockHash: `0x${string}`;
1594
+ };
1595
+ } | {
1596
+ tag: "Finalized";
1597
+ value: {
1598
+ finalizedBlockHashes: `0x${string}`[];
1599
+ prunedBlockHashes: `0x${string}`[];
1600
+ };
1601
+ } | {
1602
+ tag: "OperationBodyDone";
1603
+ value: {
1604
+ operationId: string;
1605
+ value: `0x${string}`[];
1606
+ };
1607
+ } | {
1608
+ tag: "OperationCallDone";
1609
+ value: {
1610
+ operationId: string;
1611
+ output: `0x${string}`;
1612
+ };
1613
+ } | {
1614
+ tag: "OperationStorageItems";
1615
+ value: {
1616
+ operationId: string;
1617
+ items: {
1618
+ key: `0x${string}`;
1619
+ value: `0x${string}` | null;
1620
+ hash: `0x${string}` | null;
1621
+ closestDescendantMerkleValue: `0x${string}` | null;
1622
+ }[];
1623
+ };
1624
+ } | {
1625
+ tag: "OperationStorageDone";
1626
+ value: {
1627
+ operationId: string;
1628
+ };
1629
+ } | {
1630
+ tag: "OperationWaitingForContinue";
1631
+ value: {
1632
+ operationId: string;
1633
+ };
1634
+ } | {
1635
+ tag: "OperationInaccessible";
1636
+ value: {
1637
+ operationId: string;
1638
+ };
1639
+ } | {
1640
+ tag: "OperationError";
1641
+ value: {
1642
+ operationId: string;
1643
+ error: string;
1644
+ };
1645
+ } | {
1646
+ tag: "Stop";
1647
+ value: undefined;
1648
+ };
1649
+ };
1650
+ } | {
1651
+ tag: "remote_chain_head_follow_interrupt";
1652
+ value: undefined;
1653
+ } | {
1654
+ tag: "remote_chain_head_follow_stop";
1655
+ value: undefined;
1656
+ } | {
1657
+ tag: "remote_chain_head_header_request";
1658
+ value: {
1659
+ tag: "v1";
1660
+ value: {
1661
+ genesisHash: `0x${string}`;
1662
+ followSubscriptionId: string;
1663
+ hash: `0x${string}`;
1664
+ };
1665
+ };
1666
+ } | {
1667
+ tag: "remote_chain_head_header_response";
1668
+ value: {
1669
+ tag: "v1";
1670
+ value: import("scale-ts").ResultPayload<`0x${string}` | null, import("@novasamatech/scale").CodecError<{
1671
+ reason: string;
1672
+ }, "GenericError">>;
1673
+ };
1674
+ } | {
1675
+ tag: "remote_chain_head_body_request";
1676
+ value: {
1677
+ tag: "v1";
1678
+ value: {
1679
+ genesisHash: `0x${string}`;
1680
+ followSubscriptionId: string;
1681
+ hash: `0x${string}`;
1682
+ };
1683
+ };
1684
+ } | {
1685
+ tag: "remote_chain_head_body_response";
1686
+ value: {
1687
+ tag: "v1";
1688
+ value: import("scale-ts").ResultPayload<{
1689
+ tag: "Started";
1690
+ value: {
1691
+ operationId: string;
1692
+ };
1693
+ } | {
1694
+ tag: "LimitReached";
1695
+ value: undefined;
1696
+ }, import("@novasamatech/scale").CodecError<{
1697
+ reason: string;
1698
+ }, "GenericError">>;
1699
+ };
1700
+ } | {
1701
+ tag: "remote_chain_head_storage_request";
1702
+ value: {
1703
+ tag: "v1";
1704
+ value: {
1705
+ genesisHash: `0x${string}`;
1706
+ followSubscriptionId: string;
1707
+ hash: `0x${string}`;
1708
+ items: {
1709
+ key: `0x${string}`;
1710
+ type: "Value" | "Hash" | "ClosestDescendantMerkleValue" | "DescendantsValues" | "DescendantsHashes";
1711
+ }[];
1712
+ childTrie: `0x${string}` | null;
1713
+ };
1714
+ };
1715
+ } | {
1716
+ tag: "remote_chain_head_storage_response";
1717
+ value: {
1718
+ tag: "v1";
1719
+ value: import("scale-ts").ResultPayload<{
1720
+ tag: "Started";
1721
+ value: {
1722
+ operationId: string;
1723
+ };
1724
+ } | {
1725
+ tag: "LimitReached";
1726
+ value: undefined;
1727
+ }, import("@novasamatech/scale").CodecError<{
1728
+ reason: string;
1729
+ }, "GenericError">>;
1730
+ };
1731
+ } | {
1732
+ tag: "remote_chain_head_call_request";
1733
+ value: {
1734
+ tag: "v1";
1735
+ value: {
1736
+ genesisHash: `0x${string}`;
1737
+ followSubscriptionId: string;
1738
+ hash: `0x${string}`;
1739
+ function: string;
1740
+ callParameters: `0x${string}`;
1741
+ };
1742
+ };
1743
+ } | {
1744
+ tag: "remote_chain_head_call_response";
1745
+ value: {
1746
+ tag: "v1";
1747
+ value: import("scale-ts").ResultPayload<{
1748
+ tag: "Started";
1749
+ value: {
1750
+ operationId: string;
1751
+ };
1752
+ } | {
1753
+ tag: "LimitReached";
1754
+ value: undefined;
1755
+ }, import("@novasamatech/scale").CodecError<{
1756
+ reason: string;
1757
+ }, "GenericError">>;
1758
+ };
1759
+ } | {
1760
+ tag: "remote_chain_head_unpin_request";
1761
+ value: {
1762
+ tag: "v1";
1763
+ value: {
1764
+ genesisHash: `0x${string}`;
1765
+ followSubscriptionId: string;
1766
+ hashes: `0x${string}`[];
1767
+ };
1768
+ };
1769
+ } | {
1770
+ tag: "remote_chain_head_unpin_response";
1771
+ value: {
1772
+ tag: "v1";
1773
+ value: import("scale-ts").ResultPayload<undefined, import("@novasamatech/scale").CodecError<{
1774
+ reason: string;
1775
+ }, "GenericError">>;
1776
+ };
1777
+ } | {
1778
+ tag: "remote_chain_head_continue_request";
1779
+ value: {
1780
+ tag: "v1";
1781
+ value: {
1782
+ genesisHash: `0x${string}`;
1783
+ followSubscriptionId: string;
1784
+ operationId: string;
1785
+ };
1786
+ };
1787
+ } | {
1788
+ tag: "remote_chain_head_continue_response";
1789
+ value: {
1790
+ tag: "v1";
1791
+ value: import("scale-ts").ResultPayload<undefined, import("@novasamatech/scale").CodecError<{
1792
+ reason: string;
1793
+ }, "GenericError">>;
1794
+ };
1795
+ } | {
1796
+ tag: "remote_chain_head_stop_operation_request";
1797
+ value: {
1798
+ tag: "v1";
1799
+ value: {
1800
+ genesisHash: `0x${string}`;
1801
+ followSubscriptionId: string;
1802
+ operationId: string;
1803
+ };
1804
+ };
1805
+ } | {
1806
+ tag: "remote_chain_head_stop_operation_response";
1807
+ value: {
1808
+ tag: "v1";
1809
+ value: import("scale-ts").ResultPayload<undefined, import("@novasamatech/scale").CodecError<{
1810
+ reason: string;
1811
+ }, "GenericError">>;
1812
+ };
1813
+ } | {
1814
+ tag: "remote_chain_spec_genesis_hash_request";
1815
+ value: {
1816
+ tag: "v1";
1817
+ value: `0x${string}`;
1818
+ };
1819
+ } | {
1820
+ tag: "remote_chain_spec_genesis_hash_response";
1821
+ value: {
1822
+ tag: "v1";
1823
+ value: import("scale-ts").ResultPayload<`0x${string}`, import("@novasamatech/scale").CodecError<{
1824
+ reason: string;
1825
+ }, "GenericError">>;
1826
+ };
1827
+ } | {
1828
+ tag: "remote_chain_spec_chain_name_request";
1829
+ value: {
1830
+ tag: "v1";
1831
+ value: `0x${string}`;
1832
+ };
1833
+ } | {
1834
+ tag: "remote_chain_spec_chain_name_response";
1835
+ value: {
1836
+ tag: "v1";
1837
+ value: import("scale-ts").ResultPayload<string, import("@novasamatech/scale").CodecError<{
1838
+ reason: string;
1839
+ }, "GenericError">>;
1840
+ };
1841
+ } | {
1842
+ tag: "remote_chain_spec_properties_request";
1843
+ value: {
1844
+ tag: "v1";
1845
+ value: `0x${string}`;
1846
+ };
1847
+ } | {
1848
+ tag: "remote_chain_spec_properties_response";
1849
+ value: {
1850
+ tag: "v1";
1851
+ value: import("scale-ts").ResultPayload<string, import("@novasamatech/scale").CodecError<{
1852
+ reason: string;
1853
+ }, "GenericError">>;
1854
+ };
1855
+ } | {
1856
+ tag: "remote_chain_transaction_broadcast_request";
1857
+ value: {
1858
+ tag: "v1";
1859
+ value: {
1860
+ genesisHash: `0x${string}`;
1861
+ transaction: `0x${string}`;
1862
+ };
1863
+ };
1864
+ } | {
1865
+ tag: "remote_chain_transaction_broadcast_response";
1866
+ value: {
1867
+ tag: "v1";
1868
+ value: import("scale-ts").ResultPayload<string | null, import("@novasamatech/scale").CodecError<{
1869
+ reason: string;
1870
+ }, "GenericError">>;
1871
+ };
1872
+ } | {
1873
+ tag: "remote_chain_transaction_stop_request";
1874
+ value: {
1875
+ tag: "v1";
1876
+ value: {
1877
+ genesisHash: `0x${string}`;
1878
+ operationId: string;
1879
+ };
1880
+ };
1881
+ } | {
1882
+ tag: "remote_chain_transaction_stop_response";
1883
+ value: {
1884
+ tag: "v1";
1885
+ value: import("scale-ts").ResultPayload<undefined, import("@novasamatech/scale").CodecError<{
1886
+ reason: string;
1887
+ }, "GenericError">>;
1888
+ };
1287
1889
  };
1288
1890
  }>;
1289
1891
  export type MessageAction = MessagePayloadSchema['tag'];