1 import type { SignedKeyList } from '../interfaces';
3 interface SetupMemberKeyAddressKeyPayload {
5 SignedKeyList: SignedKeyList;
11 interface SetupMemberKeyUserKeyPayload {
17 interface SetupMemberKeyPayload {
19 AddressKeys: SetupMemberKeyAddressKeyPayload[];
21 PrimaryKey: SetupMemberKeyUserKeyPayload;
24 interface SetupMemberKeyUserKeyPayloadV2 {
26 OrgPrivateKey: string;
30 interface SetupMemberKeyAddressKeyPayloadV2 {
36 SignedKeyList: SignedKeyList;
39 interface SetupMemberKeyPayloadV2 {
41 AddressKeys: SetupMemberKeyAddressKeyPayloadV2[];
43 UserKey: SetupMemberKeyUserKeyPayloadV2;
46 export const setupMemberKeyRoute = ({ MemberID, ...data }: SetupMemberKeyPayload | SetupMemberKeyPayloadV2) => ({
47 url: `members/${MemberID}/keys/setup`,
52 interface CreateMemberKeyPayload {
60 SignedKeyList: SignedKeyList;
63 interface CreateMemberKeyPayloadV2 extends Omit<CreateMemberKeyPayload, 'UserKey' | 'MemberKey' | 'Activation'> {
69 export const createMemberKeyRoute = ({ MemberID, ...data }: CreateMemberKeyPayload | CreateMemberKeyPayloadV2) => ({
70 url: `members/${MemberID}/keys`,
75 export interface MigrateMemberAddressKeyPayload {
83 interface MigrateMemberAddressKeysPayload {
85 AddressKeys: MigrateMemberAddressKeyPayload[];
86 SignedKeyLists: { [key: string]: SignedKeyList };
89 export const migrateMembersAddressKeysRoute = ({ MemberID, ...data }: MigrateMemberAddressKeysPayload) => ({
90 url: `members/${MemberID}/keys/migrate`,