Signed, beneficiary-bount Monero subaddress enrollment

This commit is contained in:
2026-10-22 11:33:38 -04:00
parent 5d607c1521
commit b865807272
9 changed files with 266 additions and 28 deletions
+4 -2
View File
@@ -3,6 +3,7 @@ export const CUSTODY_DB_ACTION_ARGUMENT_COUNTS = {
'migrate-mainnet-schema': 0,
'grant-runtime': 1,
'grant-monero-observer-runtime': 1,
'grant-monero-deposit-allocator-runtime': 1,
'grant-monero-credit-runtime': 1,
'import-sqlite': 1,
audit: 0,
@@ -23,8 +24,9 @@ export function assertCustodyDbActionAllowedOnNetwork(action: CustodyDbAction, i
if (action === 'migrate-mainnet-schema' && !isMainnet) {
throw new Error('Mainnet schema migration action requires the mainnet profile');
}
if (isMainnet && action !== 'grant-monero-observer-runtime' && action !== 'migrate-mainnet-schema') {
throw new Error('Only the separately scoped Monero observation-role grant is allowed on mainnet');
if (isMainnet && action !== 'grant-monero-observer-runtime' && action !== 'grant-monero-deposit-allocator-runtime' &&
action !== 'migrate-mainnet-schema') {
throw new Error('Only explicitly scoped Monero infrastructure-role grants and schema migration are allowed on mainnet');
}
}