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