createPrivateKeys method
Create new private keys.
Sign the provided TCreatePrivateKeysBody with the client's stamp function and submit the request (POST /public/v1/submit/create_private_keys).
See also: stampCreatePrivateKeys.
Implementation
Future<TCreatePrivateKeysResponse> createPrivateKeys({
required TCreatePrivateKeysBody input,
}) async {
final body = packActivityBody(
bodyJson: input.toJson(),
fallbackOrganizationId: input.organizationId ??
config.organizationId ??
(throw Exception(
"Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
activityType: 'ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2',
);
return await request<Map<String, dynamic>, TCreatePrivateKeysResponse>(
"/public/v1/submit/create_private_keys",
body,
(json) => TCreatePrivateKeysResponse.fromJson(
transformActivityResponse(json, 'CreatePrivateKeys')));
}