diff --git a/resources/test/rpc_schema.json b/resources/test/rpc_schema.json index bb925ab7..b3ac2b60 100644 --- a/resources/test/rpc_schema.json +++ b/resources/test/rpc_schema.json @@ -7190,6 +7190,19 @@ }, "additionalProperties": false }, + { + "description": "The main purse of the account identified by this entity address.", + "type": "object", + "required": [ + "main_purse_under_entity_addr" + ], + "properties": { + "main_purse_under_entity_addr": { + "$ref": "#/components/schemas/EntityAddr" + } + }, + "additionalProperties": false + }, { "description": "The purse identified by this URef.", "type": "object", diff --git a/rpc_sidecar/src/rpcs/state.rs b/rpc_sidecar/src/rpcs/state.rs index 6a26ff96..8295d95b 100644 --- a/rpc_sidecar/src/rpcs/state.rs +++ b/rpc_sidecar/src/rpcs/state.rs @@ -875,6 +875,8 @@ pub enum PurseIdentifier { MainPurseUnderPublicKey(PublicKey), /// The main purse of the account identified by this account hash. MainPurseUnderAccountHash(AccountHash), + /// The main purse of the account identified by this entity address. + MainPurseUnderEntityAddr(EntityAddr), /// The purse identified by this URef. PurseUref(URef), } @@ -886,6 +888,7 @@ impl PurseIdentifier { Self::MainPurseUnderAccountHash(account_hash) => { PortPurseIdentifier::Account(account_hash) } + Self::MainPurseUnderEntityAddr(entity_addr) => PortPurseIdentifier::Entity(entity_addr), Self::PurseUref(uref) => PortPurseIdentifier::Purse(uref), } }