@calimero-network/mero-react 9.11.1 → 9.11.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.
- package/README.md +5 -0
- package/dist/index.cjs +230 -325
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -31
- package/dist/index.d.ts +30 -31
- package/dist/index.js +231 -326
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1065,11 +1065,30 @@ declare function useDelegatedBootstrap(options?: UseDelegatedBootstrapOptions):
|
|
|
1065
1065
|
* MANAGE_MEMBERS…), never the relay's; the relay only needs standing to act.
|
|
1066
1066
|
*/
|
|
1067
1067
|
|
|
1068
|
+
/**
|
|
1069
|
+
* What an account asks for when it creates a context: the fields of a node's
|
|
1070
|
+
* `CreateContextRequest` that have a place in the creation warrant
|
|
1071
|
+
* (mero-js `CreationWarrantInput`), plus which namespace to find the relay by.
|
|
1072
|
+
*
|
|
1073
|
+
* Intentionally NOT here, because the warrant has no field for it:
|
|
1074
|
+
* `identitySecret` — a node's key for its new member identity; the account IS
|
|
1075
|
+
* the member identity here (`init` runs as the author's account), so there is
|
|
1076
|
+
* nothing to derive one from.
|
|
1077
|
+
*/
|
|
1068
1078
|
interface CreateDelegatedContextRequest {
|
|
1069
1079
|
readonly namespaceId: string;
|
|
1070
1080
|
/** The group to create it in; the namespace itself when omitted. */
|
|
1071
1081
|
readonly groupId?: string;
|
|
1072
1082
|
readonly applicationId: string;
|
|
1083
|
+
/**
|
|
1084
|
+
* Which service of a multi-service bundle the context is for; absent for
|
|
1085
|
+
* the bundle's default service. Signed into the warrant: the relay runs THAT
|
|
1086
|
+
* service's `init`, so a bundle like mero-docs (`registry`, `docs`) creates
|
|
1087
|
+
* the right contract.
|
|
1088
|
+
*/
|
|
1089
|
+
readonly serviceName?: string;
|
|
1090
|
+
/** The seed the context id is derived from, hex (32 bytes); random when absent. */
|
|
1091
|
+
readonly contextSeed?: string;
|
|
1073
1092
|
readonly initializationParams?: number[];
|
|
1074
1093
|
readonly name?: string;
|
|
1075
1094
|
}
|
|
@@ -1600,9 +1619,7 @@ declare function useGroupInfo(groupId?: string | null): {
|
|
|
1600
1619
|
refetch: () => Promise<void>;
|
|
1601
1620
|
};
|
|
1602
1621
|
declare function useDeleteGroup(): {
|
|
1603
|
-
deleteGroup: (groupId: string) => Promise<
|
|
1604
|
-
groupId: string;
|
|
1605
|
-
} | _calimero_network_mero_js.DeleteGroupResponseData | null>;
|
|
1622
|
+
deleteGroup: (groupId: string) => Promise<_calimero_network_mero_js.DeleteGroupResponseData | null>;
|
|
1606
1623
|
loading: boolean;
|
|
1607
1624
|
error: Error | null;
|
|
1608
1625
|
};
|
|
@@ -1675,7 +1692,7 @@ declare function useNamespacesForApplication(applicationId?: string | null): {
|
|
|
1675
1692
|
refetch: () => Promise<void>;
|
|
1676
1693
|
};
|
|
1677
1694
|
declare function useCreateNamespace(): {
|
|
1678
|
-
createNamespace: (request: CreateNamespaceRequest) => Promise<
|
|
1695
|
+
createNamespace: (request: CreateNamespaceRequest) => Promise<_calimero_network_mero_js.CreateNamespaceResponseData | null>;
|
|
1679
1696
|
loading: boolean;
|
|
1680
1697
|
error: Error | null;
|
|
1681
1698
|
};
|
|
@@ -1724,9 +1741,7 @@ declare function useRedeemInvitation(): {
|
|
|
1724
1741
|
loading: boolean;
|
|
1725
1742
|
};
|
|
1726
1743
|
declare function useCreateGroupInNamespace(): {
|
|
1727
|
-
createGroupInNamespace: (namespaceId: string, request?: CreateGroupInNamespaceRequest) => Promise<
|
|
1728
|
-
groupId: string;
|
|
1729
|
-
} | null>;
|
|
1744
|
+
createGroupInNamespace: (namespaceId: string, request?: CreateGroupInNamespaceRequest) => Promise<_calimero_network_mero_js.CreateGroupInNamespaceResponseData | null>;
|
|
1730
1745
|
loading: boolean;
|
|
1731
1746
|
error: Error | null;
|
|
1732
1747
|
};
|
|
@@ -1742,23 +1757,17 @@ declare function useNamespaceGroups(namespaceId?: string | null): {
|
|
|
1742
1757
|
* Both are 32-byte strings, so passing a key names nobody and raises nothing.
|
|
1743
1758
|
*/
|
|
1744
1759
|
declare function useUpdateMemberRole(): {
|
|
1745
|
-
updateMemberRole: (groupId: string, identity: string, request: UpdateMemberRoleRequest) => Promise<void |
|
|
1746
|
-
groupId: string;
|
|
1747
|
-
} | null>;
|
|
1760
|
+
updateMemberRole: (groupId: string, identity: string, request: UpdateMemberRoleRequest) => Promise<void | null>;
|
|
1748
1761
|
loading: boolean;
|
|
1749
1762
|
error: Error | null;
|
|
1750
1763
|
};
|
|
1751
1764
|
declare function useSetDefaultCapabilities(): {
|
|
1752
|
-
setDefaultCapabilities: (groupId: string, request: SetDefaultCapabilitiesRequest) => Promise<void |
|
|
1753
|
-
groupId: string;
|
|
1754
|
-
} | null>;
|
|
1765
|
+
setDefaultCapabilities: (groupId: string, request: SetDefaultCapabilitiesRequest) => Promise<void | null>;
|
|
1755
1766
|
loading: boolean;
|
|
1756
1767
|
error: Error | null;
|
|
1757
1768
|
};
|
|
1758
1769
|
declare function useSetSubgroupVisibility(): {
|
|
1759
|
-
setSubgroupVisibility: (groupId: string, request: SetSubgroupVisibilityRequest) => Promise<void |
|
|
1760
|
-
groupId: string;
|
|
1761
|
-
} | null>;
|
|
1770
|
+
setSubgroupVisibility: (groupId: string, request: SetSubgroupVisibilityRequest) => Promise<void | null>;
|
|
1762
1771
|
loading: boolean;
|
|
1763
1772
|
error: Error | null;
|
|
1764
1773
|
};
|
|
@@ -1780,9 +1789,7 @@ declare function useSetTeeAdmissionPolicy(): {
|
|
|
1780
1789
|
error: Error | null;
|
|
1781
1790
|
};
|
|
1782
1791
|
declare function useSetGroupMetadata(): {
|
|
1783
|
-
setGroupMetadata: (groupId: string, request: SetMetadataInput) => Promise<void |
|
|
1784
|
-
groupId: string;
|
|
1785
|
-
} | null>;
|
|
1792
|
+
setGroupMetadata: (groupId: string, request: SetMetadataInput) => Promise<void | null>;
|
|
1786
1793
|
loading: boolean;
|
|
1787
1794
|
error: Error | null;
|
|
1788
1795
|
};
|
|
@@ -1792,16 +1799,12 @@ declare function useSetGroupMetadata(): {
|
|
|
1792
1799
|
* Both are 32-byte strings, so passing a key names nobody and raises nothing.
|
|
1793
1800
|
*/
|
|
1794
1801
|
declare function useSetMemberMetadata(): {
|
|
1795
|
-
setMemberMetadata: (groupId: string, identity: string, request: SetMetadataInput) => Promise<void |
|
|
1796
|
-
groupId: string;
|
|
1797
|
-
} | null>;
|
|
1802
|
+
setMemberMetadata: (groupId: string, identity: string, request: SetMetadataInput) => Promise<void | null>;
|
|
1798
1803
|
loading: boolean;
|
|
1799
1804
|
error: Error | null;
|
|
1800
1805
|
};
|
|
1801
1806
|
declare function useSetContextMetadata(): {
|
|
1802
|
-
setContextMetadata: (groupId: string, contextId: string, request: SetMetadataInput) => Promise<void |
|
|
1803
|
-
groupId: string;
|
|
1804
|
-
} | null>;
|
|
1807
|
+
setContextMetadata: (groupId: string, contextId: string, request: SetMetadataInput) => Promise<void | null>;
|
|
1805
1808
|
loading: boolean;
|
|
1806
1809
|
error: Error | null;
|
|
1807
1810
|
};
|
|
@@ -1856,9 +1859,7 @@ declare function useRetryGroupUpgrade(): {
|
|
|
1856
1859
|
};
|
|
1857
1860
|
/** Move `childGroupId` under a new parent. */
|
|
1858
1861
|
declare function useReparentGroup(): {
|
|
1859
|
-
reparentGroup: (childGroupId: string, request: ReparentGroupRequest) => Promise<
|
|
1860
|
-
reparented: boolean;
|
|
1861
|
-
} | null>;
|
|
1862
|
+
reparentGroup: (childGroupId: string, request: ReparentGroupRequest) => Promise<_calimero_network_mero_js.ReparentGroupResponseData | null>;
|
|
1862
1863
|
loading: boolean;
|
|
1863
1864
|
error: Error | null;
|
|
1864
1865
|
};
|
|
@@ -1869,9 +1870,7 @@ declare function useSubgroups(groupId?: string | null): {
|
|
|
1869
1870
|
refetch: () => Promise<void>;
|
|
1870
1871
|
};
|
|
1871
1872
|
declare function useDetachContextFromGroup(): {
|
|
1872
|
-
detachContextFromGroup: (groupId: string, contextId: string) => Promise<void |
|
|
1873
|
-
groupId: string;
|
|
1874
|
-
} | null>;
|
|
1873
|
+
detachContextFromGroup: (groupId: string, contextId: string) => Promise<void | null>;
|
|
1875
1874
|
loading: boolean;
|
|
1876
1875
|
error: Error | null;
|
|
1877
1876
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1065,11 +1065,30 @@ declare function useDelegatedBootstrap(options?: UseDelegatedBootstrapOptions):
|
|
|
1065
1065
|
* MANAGE_MEMBERS…), never the relay's; the relay only needs standing to act.
|
|
1066
1066
|
*/
|
|
1067
1067
|
|
|
1068
|
+
/**
|
|
1069
|
+
* What an account asks for when it creates a context: the fields of a node's
|
|
1070
|
+
* `CreateContextRequest` that have a place in the creation warrant
|
|
1071
|
+
* (mero-js `CreationWarrantInput`), plus which namespace to find the relay by.
|
|
1072
|
+
*
|
|
1073
|
+
* Intentionally NOT here, because the warrant has no field for it:
|
|
1074
|
+
* `identitySecret` — a node's key for its new member identity; the account IS
|
|
1075
|
+
* the member identity here (`init` runs as the author's account), so there is
|
|
1076
|
+
* nothing to derive one from.
|
|
1077
|
+
*/
|
|
1068
1078
|
interface CreateDelegatedContextRequest {
|
|
1069
1079
|
readonly namespaceId: string;
|
|
1070
1080
|
/** The group to create it in; the namespace itself when omitted. */
|
|
1071
1081
|
readonly groupId?: string;
|
|
1072
1082
|
readonly applicationId: string;
|
|
1083
|
+
/**
|
|
1084
|
+
* Which service of a multi-service bundle the context is for; absent for
|
|
1085
|
+
* the bundle's default service. Signed into the warrant: the relay runs THAT
|
|
1086
|
+
* service's `init`, so a bundle like mero-docs (`registry`, `docs`) creates
|
|
1087
|
+
* the right contract.
|
|
1088
|
+
*/
|
|
1089
|
+
readonly serviceName?: string;
|
|
1090
|
+
/** The seed the context id is derived from, hex (32 bytes); random when absent. */
|
|
1091
|
+
readonly contextSeed?: string;
|
|
1073
1092
|
readonly initializationParams?: number[];
|
|
1074
1093
|
readonly name?: string;
|
|
1075
1094
|
}
|
|
@@ -1600,9 +1619,7 @@ declare function useGroupInfo(groupId?: string | null): {
|
|
|
1600
1619
|
refetch: () => Promise<void>;
|
|
1601
1620
|
};
|
|
1602
1621
|
declare function useDeleteGroup(): {
|
|
1603
|
-
deleteGroup: (groupId: string) => Promise<
|
|
1604
|
-
groupId: string;
|
|
1605
|
-
} | _calimero_network_mero_js.DeleteGroupResponseData | null>;
|
|
1622
|
+
deleteGroup: (groupId: string) => Promise<_calimero_network_mero_js.DeleteGroupResponseData | null>;
|
|
1606
1623
|
loading: boolean;
|
|
1607
1624
|
error: Error | null;
|
|
1608
1625
|
};
|
|
@@ -1675,7 +1692,7 @@ declare function useNamespacesForApplication(applicationId?: string | null): {
|
|
|
1675
1692
|
refetch: () => Promise<void>;
|
|
1676
1693
|
};
|
|
1677
1694
|
declare function useCreateNamespace(): {
|
|
1678
|
-
createNamespace: (request: CreateNamespaceRequest) => Promise<
|
|
1695
|
+
createNamespace: (request: CreateNamespaceRequest) => Promise<_calimero_network_mero_js.CreateNamespaceResponseData | null>;
|
|
1679
1696
|
loading: boolean;
|
|
1680
1697
|
error: Error | null;
|
|
1681
1698
|
};
|
|
@@ -1724,9 +1741,7 @@ declare function useRedeemInvitation(): {
|
|
|
1724
1741
|
loading: boolean;
|
|
1725
1742
|
};
|
|
1726
1743
|
declare function useCreateGroupInNamespace(): {
|
|
1727
|
-
createGroupInNamespace: (namespaceId: string, request?: CreateGroupInNamespaceRequest) => Promise<
|
|
1728
|
-
groupId: string;
|
|
1729
|
-
} | null>;
|
|
1744
|
+
createGroupInNamespace: (namespaceId: string, request?: CreateGroupInNamespaceRequest) => Promise<_calimero_network_mero_js.CreateGroupInNamespaceResponseData | null>;
|
|
1730
1745
|
loading: boolean;
|
|
1731
1746
|
error: Error | null;
|
|
1732
1747
|
};
|
|
@@ -1742,23 +1757,17 @@ declare function useNamespaceGroups(namespaceId?: string | null): {
|
|
|
1742
1757
|
* Both are 32-byte strings, so passing a key names nobody and raises nothing.
|
|
1743
1758
|
*/
|
|
1744
1759
|
declare function useUpdateMemberRole(): {
|
|
1745
|
-
updateMemberRole: (groupId: string, identity: string, request: UpdateMemberRoleRequest) => Promise<void |
|
|
1746
|
-
groupId: string;
|
|
1747
|
-
} | null>;
|
|
1760
|
+
updateMemberRole: (groupId: string, identity: string, request: UpdateMemberRoleRequest) => Promise<void | null>;
|
|
1748
1761
|
loading: boolean;
|
|
1749
1762
|
error: Error | null;
|
|
1750
1763
|
};
|
|
1751
1764
|
declare function useSetDefaultCapabilities(): {
|
|
1752
|
-
setDefaultCapabilities: (groupId: string, request: SetDefaultCapabilitiesRequest) => Promise<void |
|
|
1753
|
-
groupId: string;
|
|
1754
|
-
} | null>;
|
|
1765
|
+
setDefaultCapabilities: (groupId: string, request: SetDefaultCapabilitiesRequest) => Promise<void | null>;
|
|
1755
1766
|
loading: boolean;
|
|
1756
1767
|
error: Error | null;
|
|
1757
1768
|
};
|
|
1758
1769
|
declare function useSetSubgroupVisibility(): {
|
|
1759
|
-
setSubgroupVisibility: (groupId: string, request: SetSubgroupVisibilityRequest) => Promise<void |
|
|
1760
|
-
groupId: string;
|
|
1761
|
-
} | null>;
|
|
1770
|
+
setSubgroupVisibility: (groupId: string, request: SetSubgroupVisibilityRequest) => Promise<void | null>;
|
|
1762
1771
|
loading: boolean;
|
|
1763
1772
|
error: Error | null;
|
|
1764
1773
|
};
|
|
@@ -1780,9 +1789,7 @@ declare function useSetTeeAdmissionPolicy(): {
|
|
|
1780
1789
|
error: Error | null;
|
|
1781
1790
|
};
|
|
1782
1791
|
declare function useSetGroupMetadata(): {
|
|
1783
|
-
setGroupMetadata: (groupId: string, request: SetMetadataInput) => Promise<void |
|
|
1784
|
-
groupId: string;
|
|
1785
|
-
} | null>;
|
|
1792
|
+
setGroupMetadata: (groupId: string, request: SetMetadataInput) => Promise<void | null>;
|
|
1786
1793
|
loading: boolean;
|
|
1787
1794
|
error: Error | null;
|
|
1788
1795
|
};
|
|
@@ -1792,16 +1799,12 @@ declare function useSetGroupMetadata(): {
|
|
|
1792
1799
|
* Both are 32-byte strings, so passing a key names nobody and raises nothing.
|
|
1793
1800
|
*/
|
|
1794
1801
|
declare function useSetMemberMetadata(): {
|
|
1795
|
-
setMemberMetadata: (groupId: string, identity: string, request: SetMetadataInput) => Promise<void |
|
|
1796
|
-
groupId: string;
|
|
1797
|
-
} | null>;
|
|
1802
|
+
setMemberMetadata: (groupId: string, identity: string, request: SetMetadataInput) => Promise<void | null>;
|
|
1798
1803
|
loading: boolean;
|
|
1799
1804
|
error: Error | null;
|
|
1800
1805
|
};
|
|
1801
1806
|
declare function useSetContextMetadata(): {
|
|
1802
|
-
setContextMetadata: (groupId: string, contextId: string, request: SetMetadataInput) => Promise<void |
|
|
1803
|
-
groupId: string;
|
|
1804
|
-
} | null>;
|
|
1807
|
+
setContextMetadata: (groupId: string, contextId: string, request: SetMetadataInput) => Promise<void | null>;
|
|
1805
1808
|
loading: boolean;
|
|
1806
1809
|
error: Error | null;
|
|
1807
1810
|
};
|
|
@@ -1856,9 +1859,7 @@ declare function useRetryGroupUpgrade(): {
|
|
|
1856
1859
|
};
|
|
1857
1860
|
/** Move `childGroupId` under a new parent. */
|
|
1858
1861
|
declare function useReparentGroup(): {
|
|
1859
|
-
reparentGroup: (childGroupId: string, request: ReparentGroupRequest) => Promise<
|
|
1860
|
-
reparented: boolean;
|
|
1861
|
-
} | null>;
|
|
1862
|
+
reparentGroup: (childGroupId: string, request: ReparentGroupRequest) => Promise<_calimero_network_mero_js.ReparentGroupResponseData | null>;
|
|
1862
1863
|
loading: boolean;
|
|
1863
1864
|
error: Error | null;
|
|
1864
1865
|
};
|
|
@@ -1869,9 +1870,7 @@ declare function useSubgroups(groupId?: string | null): {
|
|
|
1869
1870
|
refetch: () => Promise<void>;
|
|
1870
1871
|
};
|
|
1871
1872
|
declare function useDetachContextFromGroup(): {
|
|
1872
|
-
detachContextFromGroup: (groupId: string, contextId: string) => Promise<void |
|
|
1873
|
-
groupId: string;
|
|
1874
|
-
} | null>;
|
|
1873
|
+
detachContextFromGroup: (groupId: string, contextId: string) => Promise<void | null>;
|
|
1875
1874
|
loading: boolean;
|
|
1876
1875
|
error: Error | null;
|
|
1877
1876
|
};
|