@calimero-network/mero-react 9.11.2 → 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 +2 -0
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +7 -0
- 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
|
}
|
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
|
}
|
package/dist/index.js
CHANGED
|
@@ -530,6 +530,8 @@ async function createDelegatedContext(s, req, deps = {}) {
|
|
|
530
530
|
const created = await client(s, relay, { next: async () => creationNonce }, deps.fetch).createContext({
|
|
531
531
|
groupId: req.groupId ?? req.namespaceId,
|
|
532
532
|
applicationId: req.applicationId,
|
|
533
|
+
serviceName: req.serviceName,
|
|
534
|
+
seed: req.contextSeed,
|
|
533
535
|
initArgs: initArgsOf(req.initializationParams),
|
|
534
536
|
name: req.name
|
|
535
537
|
});
|
|
@@ -907,6 +909,8 @@ function createAccountAdmin(input, deps = {}) {
|
|
|
907
909
|
namespaceId,
|
|
908
910
|
groupId: req.groupId,
|
|
909
911
|
applicationId: req.applicationId,
|
|
912
|
+
serviceName: req.serviceName,
|
|
913
|
+
contextSeed: req.contextSeed,
|
|
910
914
|
name: req.name,
|
|
911
915
|
initializationParams: req.initializationParams
|
|
912
916
|
});
|
|
@@ -3758,6 +3762,9 @@ function useCreateContext() {
|
|
|
3758
3762
|
() => createDelegatedContext(session, {
|
|
3759
3763
|
namespaceId: request.groupId,
|
|
3760
3764
|
applicationId: request.applicationId,
|
|
3765
|
+
serviceName: request.serviceName,
|
|
3766
|
+
contextSeed: request.contextSeed,
|
|
3767
|
+
name: request.name,
|
|
3761
3768
|
initializationParams: request.initializationParams
|
|
3762
3769
|
})
|
|
3763
3770
|
);
|